Now About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-12-30 10:08:49 -0500
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-12-30 10:08:49 -0500
commitce0bada559e24501c31707dddd90f9d9b927a568 (patch)
tree6525b4aa99da78f493da67555d1c70e22317a1a5 /src
parented0134dbe552281278b5d6f0864c6a7d7fae32e0 (diff)
chat: Reorganize how system messages are presented
Diffstat (limited to 'src')
-rw-r--r--src/chat.py3
-rw-r--r--src/message.py5
2 files changed, 4 insertions, 4 deletions
diff --git a/src/chat.py b/src/chat.py
index bb82af8..b659395 100644
--- a/src/chat.py
+++ b/src/chat.py
@@ -158,7 +158,8 @@ class WeegtkChat(Adw.Bin):
# the system instead of from a user
if (len(user) == 0 or user[0] == "=" or user[0] == "-" or user[0] == "["
or user[0] == "<"):
- user = f"{self.data['short_name']} {user}"
+ msg = "{}{}".format(user, msg)
+ user = "System"
msg_type = "system"
if count != 0:
diff --git a/src/message.py b/src/message.py
index 128dbed..7a14483 100644
--- a/src/message.py
+++ b/src/message.py
@@ -59,12 +59,11 @@ class WeegtkMessage(Gtk.Box):
self.set_visible(True)
self.username.set_label(data["username"])
- # Hide avatar for system messages
+ # Use gear avatar for system messages
if data["type"] == "system":
- self.avatar.set_visible(False)
+ self.avatar.set_text("\U00002699") # Gear emoji
else:
self.avatar.set_text(data["username"])
- self.avatar.set_visible(True)
first = True
for message in data["text"]: