From bd631f6f5fd9c94afd3a9616201126177bc095f8 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 21 Dec 2022 00:04:45 +0100 Subject: [PATCH] Updated LXMF propagation node list display --- nomadnet/ui/textui/Network.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nomadnet/ui/textui/Network.py b/nomadnet/ui/textui/Network.py index 81f725f..9d51928 100644 --- a/nomadnet/ui/textui/Network.py +++ b/nomadnet/ui/textui/Network.py @@ -1604,7 +1604,14 @@ class LXMFPeerEntry(urwid.WidgetWrap): style = "list_unknown" focus_style = "list_focus" - widget = ListEntry(sym+" "+display_str+"\n "+str(len(peer.unhandled_messages))+" unhandled LXMs - "+"Last heard "+pretty_date(int(peer.last_heard))) + alive_string = "Unknown" + if hasattr(peer, "alive"): + if peer.alive: + alive_string = "Available" + else: + alive_string = "Unresponsive" + + widget = ListEntry(sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))+"\n "+str(len(peer.unhandled_messages))+" unhandled LXMs") # urwid.connect_signal(widget, "click", delegate.connect_node, node) self.display_widget = urwid.AttrMap(widget, style, focus_style)