Commit 7daa681a authored by ichim-david's avatar ichim-david

Show dt elements on xmppchat-roster only if they have length and they are not...

Show dt elements on xmppchat-roster only if they have length and they are not already visible to avoid making them all the time visible when they might already be so
parent 85e9c7ce
......@@ -1626,9 +1626,9 @@
if (!item) {
return this;
}
var $my_contacts = this.$el.find('#xmpp-contacts').show(),
$contact_requests = this.$el.find('#xmpp-contact-requests').show(),
$pending_contacts = this.$el.find('#pending-xmpp-contacts').show(),
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, num, presence_change;
var user_id = Strophe.getNodeFromJid(item.id),
view = this.rosteritemviews[item.id],
......@@ -1676,8 +1676,8 @@
}
// Hide the headings if there are no contacts under them
_.each([$my_contacts, $contact_requests, $pending_contacts], function (h) {
if (!h.nextUntil('dt').length) {
h.hide();
if (h.nextUntil('dt').length && !h.is('visible')) {
h.show();
}
});
$count = $('#online-count');
......
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