re-compute big brother when a contact of a metacontact goes offline. fixes #3464
This commit is contained in:
parent
d85e0fdc75
commit
6951442efb
|
@ -520,7 +520,15 @@ class RosterWindow:
|
||||||
gajim.account_is_disconnected(account))) and nb_events == 0:
|
gajim.account_is_disconnected(account))) and nb_events == 0:
|
||||||
self.remove_contact(contact, account)
|
self.remove_contact(contact, account)
|
||||||
else:
|
else:
|
||||||
self.draw_contact(contact.jid, account)
|
# If it's a metacontact, big brother may have changed, so remove and
|
||||||
|
# re-add
|
||||||
|
model = self.tree.get_model()
|
||||||
|
iters = self.get_contact_iter(contact.jid, account)
|
||||||
|
if iters and model.iter_has_child(iters[0]):
|
||||||
|
self.remove_contact(contact, account)
|
||||||
|
self.add_contact_to_roster(contact.jid, account)
|
||||||
|
else:
|
||||||
|
self.draw_contact(contact.jid, account)
|
||||||
|
|
||||||
def remove_contact(self, contact, account):
|
def remove_contact(self, contact, account):
|
||||||
'''Remove a contact from the roster'''
|
'''Remove a contact from the roster'''
|
||||||
|
|
Loading…
Reference in New Issue