unset custom status icon only when remote contact goes offline or connects. Fixes #4801

This commit is contained in:
Yann Leboulanger 2009-02-11 20:48:41 +00:00
parent e11e3b01ba
commit a1c40f9b08
2 changed files with 8 additions and 5 deletions

View file

@ -774,6 +774,14 @@ class Interface:
self.roster.draw_contact(contact1.jid, account)
gobject.timeout_add_seconds(5, self.roster.remove_to_be_removed,
contact1.jid, account)
# unset custom status
if (old_show == 0 and new_show > 1) or (old_show > 1 and new_show == 0\
and conn.connected > 1):
if account in self.status_sent_to_users and \
jid in self.status_sent_to_users[account]:
del self.status_sent_to_users[account][jid]
contact1.show = array[1]
contact1.status = status_message
contact1.priority = priority

View file

@ -2043,11 +2043,6 @@ class RosterWindow:
if ctrl:
ctrl.update_status_display(name, uf_show, status)
# unset custom status
if account in gajim.interface.status_sent_to_users and \
contact.jid in gajim.interface.status_sent_to_users[account]:
del gajim.interface.status_sent_to_users[account][contact.jid]
# Delete pep if needed
keep_pep = any(c.show not in ('error', 'offline') for c in
contact_instances)