Commit 60eb7552 authored by JC Brand's avatar JC Brand

Bugfix. Only show a roster group if it has contacts in it.

parent 3d6d14c4
...@@ -3826,7 +3826,7 @@ ...@@ -3826,7 +3826,7 @@
} }
}, this)); }, this));
} }
this.showIfInvisible(); this.showIfNecessary();
} else { } else {
q = q.toLowerCase(); q = q.toLowerCase();
matches = this.model.contacts.filter(contains.not('fullname', q)); matches = this.model.contacts.filter(contains.not('fullname', q));
...@@ -3839,13 +3839,13 @@ ...@@ -3839,13 +3839,13 @@
_.each(this.model.contacts.reject(contains.not('fullname', q)), $.proxy(function (item) { _.each(this.model.contacts.reject(contains.not('fullname', q)), $.proxy(function (item) {
this.get(item.get('id')).$el.show(); this.get(item.get('id')).$el.show();
}, this)); }, this));
this.showIfInvisible(); this.showIfNecessary();
} }
} }
}, },
showIfInvisible: function () { showIfNecessary: function () {
if (!this.$el.is(':visible')) { if (!this.$el.is(':visible') && this.model.contacts.length > 0) {
this.$el.show(); this.$el.show();
} }
}, },
......
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