Correctly remove highlighted messages events when scrolling at end of textview.
Fixes #3717.
This commit is contained in:
parent
a2fdd299ad
commit
801c31e537
|
@ -892,11 +892,15 @@ class ChatControlBase(MessageControl):
|
|||
jid = self.contact.get_full_jid()
|
||||
else:
|
||||
jid = self.contact.jid
|
||||
types_list = []
|
||||
type_ = self.type_id
|
||||
if type_ == message_control.TYPE_GC:
|
||||
type_ = 'gc_msg'
|
||||
if not len(gajim.events.get_events(self.account, jid, ['printed_' + type_,
|
||||
type_])):
|
||||
types_list = ['printed_' + type_, type_, 'printed_marked_gc_msg']
|
||||
else: # Not a GC
|
||||
types_list = ['printed_' + type_, type_]
|
||||
|
||||
if not len(gajim.events.get_events(self.account, jid, types_list)):
|
||||
return
|
||||
if not self.parent_win:
|
||||
return
|
||||
|
@ -905,7 +909,7 @@ class ChatControlBase(MessageControl):
|
|||
self.parent_win.window.is_active():
|
||||
# we are at the end
|
||||
if not gajim.events.remove_events(self.account, self.get_full_jid(),
|
||||
types = ['printed_' + type_, type_]):
|
||||
types = types_list):
|
||||
# There were events to remove
|
||||
self.redraw_after_event_removed(jid)
|
||||
|
||||
|
|
Loading…
Reference in New Issue