From 923dcc593d36eb532c84963c74ca8e6613acf616 Mon Sep 17 00:00:00 2001 From: souliane Date: Wed, 13 Jan 2016 08:50:40 +0100 Subject: [PATCH] primitivus (chat): since dialog refresh is done in message notification, print the message first and then notify --- frontends/src/primitivus/chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/src/primitivus/chat.py b/frontends/src/primitivus/chat.py index cbb2a898..477421fb 100644 --- a/frontends/src/primitivus/chat.py +++ b/frontends/src/primitivus/chat.py @@ -303,9 +303,9 @@ class Chat(PrimitivusWidget, QuickChat): @param message (unicode): message content @param extra (dict): extra data """ - QuickChat.printMessage(self, nick, my_message, message, timestamp, extra, profile) new_text = ChatText(self, timestamp, nick, my_message, message) self.content.append(new_text) + QuickChat.printMessage(self, nick, my_message, message, timestamp, extra, profile) def printInfo(self, msg, type_='normal', extra=None): """Print general info @@ -315,7 +315,6 @@ class Chat(PrimitivusWidget, QuickChat): me: "/me" information like "/me clenches his fist" ==> "toto clenches his fist" @param timestamp (float): number of seconds since epoch """ - QuickChat.printInfo(self, msg, type_, extra) if extra is None: extra = {} try: @@ -324,6 +323,7 @@ class Chat(PrimitivusWidget, QuickChat): timestamp = None _widget = ChatText(self, timestamp, None, False, msg, is_info=True) self.content.append(_widget) + QuickChat.printInfo(self, msg, type_, extra) def notify(self, contact="somebody", msg=""): """Notify the user of a new message if primitivus doesn't have the focus.