primitivus (chat): since dialog refresh is done in message notification, print the message first and then notify
This commit is contained in:
parent
f16e277e8f
commit
923dcc593d
1 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue