primitivus: fixed messages order in chat window
This commit is contained in:
parent
8d34cacc1d
commit
031bd3134f
1 changed files with 67 additions and 13 deletions
|
|
@ -247,8 +247,9 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
timestamp - time.mktime(_chat_text.timestamp) < 5):
|
||||
#we discard double messages, to avoid backlog / history conflict
|
||||
return
|
||||
my_jid = self.host.profiles[profile]['whoami']
|
||||
self.content.append(ChatText(self, timestamp or None, nick, mymess, msg))
|
||||
if timestamp:
|
||||
self.content.sort(key=lambda chat_text: chat_text.timestamp)
|
||||
if self.text_list.get_focus()[1] == len(self.content)-2:
|
||||
#we don't change focus if user is not at the bottom
|
||||
#as that mean that he is probably watching discussion history
|
||||
|
|
|
|||
Loading…
Reference in a new issue