Skip to content

Commit

Permalink
feat: display messages at the bottom and scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
gounux committed Jul 26, 2024
1 parent 80b4db6 commit 8f69854
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qtribu/gui/dck_qchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ def on_ws_message_received(self, message: str) -> None:
message["avatar"],
message["message"],
)
self.twg_chat.insertTopLevelItem(0, item)
self.twg_chat.addTopLevelItem(item)
self.twg_chat.scrollToItem(item)

# check if a notification sound should be played
if (
Expand Down Expand Up @@ -541,7 +542,8 @@ def add_admin_message(self, room: str, message: str) -> None:
message,
foreground_color=self.settings.qchat_color_admin,
)
self.twg_chat.insertTopLevelItem(0, item)
self.twg_chat.addTopLevelItem(item)
self.twg_chat.scrollToItem(item)

def create_message_item(
self,
Expand Down

0 comments on commit 8f69854

Please sign in to comment.