From 5ddb2829f36d87f7b20e131ff5f5ddf82f545f9c Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Fri, 13 Jun 2008 22:54:36 +0000 Subject: [PATCH] Do not instantly recalibrate metacontacts when the last online brother signs out. Fixes #3880. --- src/roster_window.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/roster_window.py b/src/roster_window.py index 4d82013d2..53ddad14b 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -550,7 +550,11 @@ class RosterWindow: # Check if the current BigBrother has even been before. if parent_type == 'contact': - # There is a new big brother + for data in nearby_family: + # recalibrate after remove to keep highlight + if data['jid'] in gajim.to_be_removed[data['account']]: + return + self._remove_metacontact_family(family, account) brothers = self._add_metacontact_family(family, account) @@ -829,6 +833,10 @@ class RosterWindow: return if jid in gajim.to_be_removed[account]: gajim.to_be_removed[account].remove(jid) + family = gajim.contacts.get_metacontacts_family(account, jid) + if family: + # Peform delayed recalibration + self._recalibrate_metacontact_family(family, account) self.draw_contact(jid, account) #FIXME: integrate into add_contact()