changeset 1399:5c3d1d970b94

quick_frontend: keep the contact list groups synchronised on contact deletion
author souliane <souliane@mailoo.org>
date Wed, 01 Apr 2015 23:59:56 +0200
parents f8ecce11a0bc
children c8459b53bb81
files frontends/src/quick_frontend/quick_contact_list.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_contact_list.py	Wed Apr 01 23:56:32 2015 +0200
+++ b/frontends/src/quick_frontend/quick_contact_list.py	Wed Apr 01 23:59:56 2015 +0200
@@ -208,6 +208,7 @@
         @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 @@
         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_: