Make sure show
is created on all chatbox types
This commit is contained in:
parent
fe1ba6265a
commit
6cce931086
@ -256,10 +256,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
initialize () {
|
initialize () {
|
||||||
this.scrollDown = _.debounce(this._scrollDown, 250);
|
this.initDebounced();
|
||||||
this.markScrolled = _.debounce(this._markScrolled, 100);
|
|
||||||
this.show = _.debounce(this._show, 250, {'leading': true});
|
|
||||||
|
|
||||||
|
|
||||||
this.createEmojiPicker();
|
this.createEmojiPicker();
|
||||||
this.model.messages.on('add', this.onMessageAdded, this);
|
this.model.messages.on('add', this.onMessageAdded, this);
|
||||||
@ -276,6 +273,12 @@
|
|||||||
_converse.emit('chatBoxInitialized', this);
|
_converse.emit('chatBoxInitialized', this);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
initDebounced () {
|
||||||
|
this.scrollDown = _.debounce(this._scrollDown, 250);
|
||||||
|
this.markScrolled = _.debounce(this._markScrolled, 100);
|
||||||
|
this.show = _.debounce(this._show, 250, {'leading': true});
|
||||||
|
},
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
// XXX: Is this still needed?
|
// XXX: Is this still needed?
|
||||||
this.el.setAttribute('id', this.model.get('box_id'));
|
this.el.setAttribute('id', this.model.get('box_id'));
|
||||||
|
@ -93,8 +93,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
initialize () {
|
initialize () {
|
||||||
this.scrollDown = _.debounce(this._scrollDown, 250);
|
this.initDebounced();
|
||||||
this.markScrolled = _.debounce(this._markScrolled, 100);
|
|
||||||
this.disable_mam = true; // Don't do MAM queries for this box
|
this.disable_mam = true; // Don't do MAM queries for this box
|
||||||
this.model.messages.on('add', this.onMessageAdded, this);
|
this.model.messages.on('add', this.onMessageAdded, this);
|
||||||
this.model.on('show', this.show, this);
|
this.model.on('show', this.show, this);
|
||||||
|
@ -507,8 +507,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
initialize () {
|
initialize () {
|
||||||
this.scrollDown = _.debounce(this._scrollDown, 250);
|
this.initDebounced();
|
||||||
this.markScrolled = _.debounce(this._markScrolled, 100);
|
|
||||||
|
|
||||||
this.model.messages.on('add', this.onMessageAdded, this);
|
this.model.messages.on('add', this.onMessageAdded, this);
|
||||||
this.model.messages.on('rendered', this.scrollDown, this);
|
this.model.messages.on('rendered', this.scrollDown, this);
|
||||||
|
Loading…
Reference in New Issue
Block a user