# HG changeset patch # User souliane # Date 1423247473 -3600 # Node ID 789e86a8919d7cc8be414cd5090d658c371f0113 # Parent 3dc7f61677bbb7a6339c810e1ad66082a3666a34 quick_frontend: remove the contact from the groups it has been removed from diff -r 3dc7f61677bb -r 789e86a8919d frontends/src/quick_frontend/quick_contact_list.py --- a/frontends/src/quick_frontend/quick_contact_list.py Fri Feb 06 19:29:37 2015 +0100 +++ b/frontends/src/quick_frontend/quick_contact_list.py Fri Feb 06 19:31:13 2015 +0100 @@ -236,6 +236,10 @@ if groups is not None: if not groups: groups = [None] # [None] is the default group + if C.CONTACT_GROUPS in cache: + # XXX: don't use set(cache[C.CONTACT_GROUPS]).difference(groups) because it won't work in Pyjamas if None is in cache[C.CONTACT_GROUPS] + for group in [group for group in cache[C.CONTACT_GROUPS] if group not in groups]: + self._groups[group]['jids'].remove(entity_bare) cache[C.CONTACT_GROUPS] = groups for group in groups: self._groups.setdefault(group, {}).setdefault('jids', set()).add(entity_bare)