Commit 868aacb2 authored by JC Brand's avatar JC Brand

Controlbox fix. Make sure to initialize the view again.

parent bd576c74
...@@ -85,10 +85,16 @@ ...@@ -85,10 +85,16 @@
ChatBoxViews: { ChatBoxViews: {
onChatBoxAdded: function (item) { onChatBoxAdded: function (item) {
var view = this.get(item.get('id')); if (item.get('box_id') === 'controlbox') {
if (!view && item.get('box_id') === 'controlbox') { var view = this.get(item.get('id'));
view = new converse.ControlBoxView({model: item}); if (view) {
return this.add(item.get('id'), view); view.model = item;
view.initialize();
return view;
} else {
view = new converse.ControlBoxView({model: item});
return this.add(item.get('id'), view);
}
} else { } else {
return this._super.onChatBoxAdded.apply(this, arguments); return this._super.onChatBoxAdded.apply(this, arguments);
} }
......
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