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