Correctly remove highlighted messages events when scrolling at end of textview.

Fixes #3717.
This commit is contained in:
Jean-Marie Traissard 2008-03-12 01:34:41 +00:00
parent a2fdd299ad
commit 801c31e537
1 changed files with 8 additions and 4 deletions

View File

@ -892,11 +892,15 @@ class ChatControlBase(MessageControl):
jid = self.contact.get_full_jid() jid = self.contact.get_full_jid()
else: else:
jid = self.contact.jid jid = self.contact.jid
types_list = []
type_ = self.type_id type_ = self.type_id
if type_ == message_control.TYPE_GC: if type_ == message_control.TYPE_GC:
type_ = 'gc_msg' type_ = 'gc_msg'
if not len(gajim.events.get_events(self.account, jid, ['printed_' + type_, types_list = ['printed_' + type_, type_, 'printed_marked_gc_msg']
type_])): else: # Not a GC
types_list = ['printed_' + type_, type_]
if not len(gajim.events.get_events(self.account, jid, types_list)):
return return
if not self.parent_win: if not self.parent_win:
return return
@ -905,7 +909,7 @@ class ChatControlBase(MessageControl):
self.parent_win.window.is_active(): self.parent_win.window.is_active():
# we are at the end # we are at the end
if not gajim.events.remove_events(self.account, self.get_full_jid(), if not gajim.events.remove_events(self.account, self.get_full_jid(),
types = ['printed_' + type_, type_]): types = types_list):
# There were events to remove # There were events to remove
self.redraw_after_event_removed(jid) self.redraw_after_event_removed(jid)