From 9e81f3f8d6a0b79c83130993846623599d16218e Mon Sep 17 00:00:00 2001 From: souliane Date: Wed, 1 Apr 2015 23:59:56 +0200 Subject: [PATCH] quick_frontend: keep the contact list groups synchronised on contact deletion --- frontends/src/quick_frontend/quick_contact_list.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontends/src/quick_frontend/quick_contact_list.py b/frontends/src/quick_frontend/quick_contact_list.py index 8fc9d41b..2131657b 100644 --- a/frontends/src/quick_frontend/quick_contact_list.py +++ b/frontends/src/quick_frontend/quick_contact_list.py @@ -208,6 +208,7 @@ class QuickContactList(QuickWidget): @param name: name of the data (can't be "jids") @param value: value to set """ + # FIXME: this is never used, should it be removed? assert name is not 'jids' self._groups[group][name] = value @@ -368,6 +369,8 @@ class QuickContactList(QuickWidget): del self._cache[entity_bare] for group in groups: self._groups[group]['jids'].remove(entity_bare) + if not self._groups[group]['jids']: + self._groups.pop(group) for set_ in (self._selected, self._alerts, self._specials, self._special_extras): to_remove = set() for set_entity in set_: