Controlbox fix. Make sure to initialize the view again.

This commit is contained in:
JC Brand 2016-03-29 15:41:27 +00:00
parent bd576c74d2
commit 868aacb2fc

View File

@ -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);
}