Properly remove ContactView from the overview
This commit is contained in:
parent
93a20ee4ee
commit
faaaa8139a
@ -707,13 +707,13 @@
|
|||||||
// also cause the contact's view to be removed from the
|
// also cause the contact's view to be removed from the
|
||||||
// "Pending Contacts" group.
|
// "Pending Contacts" group.
|
||||||
this.model.contacts.remove(contact, {'silent': true});
|
this.model.contacts.remove(contact, {'silent': true});
|
||||||
this.get(contact.get('jid')).remove();
|
|
||||||
this.onRemove(contact);
|
this.onRemove(contact);
|
||||||
},
|
},
|
||||||
|
|
||||||
onRemove (contact) {
|
onRemove (contact) {
|
||||||
|
this.remove(contact.get('jid'));
|
||||||
if (this.model.contacts.length === 0) {
|
if (this.model.contacts.length === 0) {
|
||||||
this.el.parentElement.removeChild(this.el);
|
this.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user