Call render on the roster if an item is removed, to clear headings.
This commit is contained in:
parent
4eae6ae2aa
commit
f28e20dc41
@ -1662,6 +1662,7 @@
|
||||
if (view) {
|
||||
view.$el.remove();
|
||||
delete this.rosteritemviews[item.id];
|
||||
this.render();
|
||||
}
|
||||
},
|
||||
|
||||
@ -1699,16 +1700,12 @@
|
||||
'<dt id="pending-xmpp-contacts">Pending contacts</dt>'),
|
||||
|
||||
render: function (item) {
|
||||
if (!item) {
|
||||
return this;
|
||||
}
|
||||
var $my_contacts = this.$el.find('#xmpp-contacts'),
|
||||
$contact_requests = this.$el.find('#xmpp-contact-requests'),
|
||||
$pending_contacts = this.$el.find('#pending-xmpp-contacts'),
|
||||
$count, presence_change;
|
||||
// TODO see if user_id would be useful
|
||||
if (item) {
|
||||
var jid = item.id,
|
||||
user_id = Strophe.getNodeFromJid(jid),
|
||||
view = this.rosteritemviews[item.id],
|
||||
ask = item.get('ask'),
|
||||
subscription = item.get('subscription'),
|
||||
@ -1751,6 +1748,7 @@
|
||||
this.initialSort();
|
||||
this.$el.show();
|
||||
}
|
||||
}
|
||||
// Hide the headings if there are no contacts under them
|
||||
_.each([$my_contacts, $contact_requests, $pending_contacts], function (h) {
|
||||
if (h.nextUntil('dt').length) {
|
||||
|
Loading…
Reference in New Issue
Block a user