primitivus: fixed double messages discarding
This commit is contained in:
parent
7c6c829ea5
commit
7b62c7eef1
1 changed files with 3 additions and 3 deletions
|
|
@ -251,9 +251,9 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
continue #the new message is older, we need to insert it upper
|
||||
|
||||
#we discard double messages, to avoid backlog / history conflict
|
||||
if idx and self.content[idx-1].message == msg:
|
||||
return
|
||||
if idx<len(self.content)-2 and self.content[idx+1].message == msg:
|
||||
if ((idx and self.content[idx-1].message == msg) or
|
||||
(self.content[idx].message == msg) or
|
||||
(idx<len(self.content)-2 and self.content[idx+1].message)):
|
||||
return
|
||||
|
||||
self.content.insert(idx+1, new_text)
|
||||
|
|
|
|||
Loading…
Reference in a new issue