From 6199578ed18101c2245b3f2b28e0e579b6e59833 Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Sat, 5 Oct 2024 23:29:53 +0100 Subject: chat: Improve system message handling Not 100% happy with how system messages are displayed. Need to find a better system for how to handle them. --- src/message.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/message.py') diff --git a/src/message.py b/src/message.py index 368ab7d..4e37609 100644 --- a/src/message.py +++ b/src/message.py @@ -57,7 +57,13 @@ class WeegtkMessage(Gtk.Box): else: self.set_visible(True) self.username.set_label(data["username"]) - self.avatar.set_text(data["username"]) + + # Hide avatar for system messages + if data["type"] == "system": + self.avatar.set_visible(False) + else: + self.avatar.set_text(data["username"]) + self.avatar.set_visible(True) first = True for message in data["text"]: -- cgit