Commit da0c858f authored by JC Brand's avatar JC Brand

Used debounce ineffectually. Fixed now.

The ChatBox.show() method was being called for every invocation, 100ms after
the fact, instead of it being called only once.

Fixed that and also changed to call it at the start.
parent e94904e4
This diff is collapsed.
This diff is collapsed.
......@@ -1429,7 +1429,7 @@
converse.incrementMsgCounter();
}
if (!this.model.get('minimized') && !this.$el.is(':visible')) {
_.debounce(this.show.bind(this), 100)();
this.show();
}
},
......@@ -1830,7 +1830,7 @@
return this;
},
show: function (focus) {
show: _.debounce(function (callback) {
if (this.$el.is(':visible') && this.$el.css('opacity') === "1") {
if (focus) { this.focus(); }
return this;
......@@ -1849,7 +1849,7 @@
}
}.bind(this));
return this;
},
}, 250, true),
scrollDownMessageHeight: function ($message) {
if (this.$content.is(':visible')) {
......
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