Performance fix. Debounce the update method on the roster.
This commit is contained in:
parent
6088417df7
commit
f4ff6370b9
@ -3851,14 +3851,14 @@
|
||||
this.model.on("reset", this.reset, this);
|
||||
},
|
||||
|
||||
update: function () {
|
||||
update: _.debounce(function () {
|
||||
var $count = $('#online-count');
|
||||
$count.text('('+converse.roster.getNumOnlineContacts()+')');
|
||||
if (!$count.is(':visible')) {
|
||||
$count.show();
|
||||
}
|
||||
return this.showHideFilter();
|
||||
},
|
||||
}, 300),
|
||||
|
||||
render: function () {
|
||||
this.$el.html(converse.templates.roster({
|
||||
|
@ -50,7 +50,5 @@
|
||||
|
||||
it("contacts in a very large roster change their statuses", $.proxy(function() {
|
||||
}, converse));
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user