quick_frontend: remove the contact from the groups it has been removed from
This commit is contained in:
parent
437b2f0635
commit
f0f097c106
1 changed files with 4 additions and 0 deletions
|
|
@ -236,6 +236,10 @@ class QuickContactList(QuickWidget):
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue