Commit 09d05732 authored by Yann Leboulanger's avatar Yann Leboulanger

don't traceback when we remove a contact that is alone in a metacontact. Fixes #4317

parent 71692d2d
......@@ -747,9 +747,11 @@ def remove_contact(self, jid, account, force=False, backend=False):
# Remove contact before redrawing, otherwise the old
# numbers will still be show
gajim.contacts.remove_jid(account, jid, remove_meta=True)
if iters and family:
rest_of_family = [data for data in family
if account != data['account'] or jid != data['jid']]
if iters and rest_of_family:
# reshow the rest of the family
brothers = self._add_metacontact_family(family, account)
brothers = self._add_metacontact_family(rest_of_family, account)
for c, acc in brothers:
self.draw_completely(c.jid, acc)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment