Controlbox fix. Make sure to initialize the view again.
This commit is contained in:
parent
bd576c74d2
commit
868aacb2fc
@ -85,10 +85,16 @@
|
|||||||
|
|
||||||
ChatBoxViews: {
|
ChatBoxViews: {
|
||||||
onChatBoxAdded: function (item) {
|
onChatBoxAdded: function (item) {
|
||||||
|
if (item.get('box_id') === 'controlbox') {
|
||||||
var view = this.get(item.get('id'));
|
var view = this.get(item.get('id'));
|
||||||
if (!view && item.get('box_id') === 'controlbox') {
|
if (view) {
|
||||||
|
view.model = item;
|
||||||
|
view.initialize();
|
||||||
|
return view;
|
||||||
|
} else {
|
||||||
view = new converse.ControlBoxView({model: item});
|
view = new converse.ControlBoxView({model: item});
|
||||||
return this.add(item.get('id'), view);
|
return this.add(item.get('id'), view);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return this._super.onChatBoxAdded.apply(this, arguments);
|
return this._super.onChatBoxAdded.apply(this, arguments);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user