From 3cecf5e259c5f8c51974a938d0f73531fb27806c Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 28 Oct 2023 20:13:39 +0200 Subject: [PATCH] Improved message detail rendering --- sbapp/ui/messages.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sbapp/ui/messages.py b/sbapp/ui/messages.py index 7e8966e..d9b9f38 100644 --- a/sbapp/ui/messages.py +++ b/sbapp/ui/messages.py @@ -201,11 +201,11 @@ class Messages(): if "euclidian" in d: edst = d["euclidian"] if edst != None: - rcvd_d_str = " [b]Distance[/b] "+RNS.prettydistance(edst) + rcvd_d_str = "\n[b]Distance[/b] "+RNS.prettydistance(edst) elif "geodesic" in d: gdst = d["geodesic"] if gdst != None: - rcvd_d_str = " [b]Distance[/b] "+RNS.prettydistance(gdst) + rcvd_d_str = "\n[b]Distance[/b] "+RNS.prettydistance(gdst) + " (geodesic)" phy_stats_str = "" if "extras" in m and m["extras"] != None: @@ -266,13 +266,12 @@ class Messages(): if phy_stats_str != "" and self.app.sideband.config["advanced_stats"]: heading_str += phy_stats_str+"\n" - heading_str += "[b]Received[/b] "+rxstr + heading_str += "[b]Sent[/b] "+txstr + heading_str += "\n[b]Received[/b] "+rxstr - if rcvd_d_str != "" and self.app.sideband.config["advanced_stats"]: + if rcvd_d_str != "": heading_str += rcvd_d_str - heading_str += "\n[b]Sent[/b] "+txstr - item = ListLXMessageCard( text=m["content"].decode("utf-8"), heading=heading_str,