diff options
author | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2024-10-05 23:29:53 +0100 |
---|---|---|
committer | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2024-10-05 23:29:53 +0100 |
commit | 6199578ed18101c2245b3f2b28e0e579b6e59833 (patch) | |
tree | 1728688d933784a9407b4e0565cfdce59a2ddd37 /src/message.py | |
parent | ddf331a607e6286bccba8eaa55916544c1029a58 (diff) |
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.
Diffstat (limited to 'src/message.py')
-rw-r--r-- | src/message.py | 8 |
1 files changed, 7 insertions, 1 deletions
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"]: |