Create the minimized_chats obj during _initialization
and don't remove during `_tearDown`. Fixes bug in `trimChats` when logging in again and `converse.minimized_chats` is undefined.
This commit is contained in:
parent
5ed8dfbe0a
commit
7de76924b4
@ -32,22 +32,12 @@
|
||||
//
|
||||
// New functions which don't exist yet can also be added.
|
||||
|
||||
_tearDown: function () {
|
||||
this._super._tearDown.apply(this, arguments);
|
||||
if (this.minimized_chats) {
|
||||
this.minimized_chats.undelegateEvents().model.reset();
|
||||
this.minimized_chats.removeAll(); // Remove sub-views
|
||||
this.minimized_chats.tearDown().remove(); // Remove overview
|
||||
delete this.minimized_chats;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
onConnected: function () {
|
||||
_initialize: function () {
|
||||
this._super._initialize.apply(this, arguments);
|
||||
converse.minimized_chats = new converse.MinimizedChats({
|
||||
model: converse.chatboxes
|
||||
});
|
||||
return this._super.onConnected.apply(this, arguments);
|
||||
return this;
|
||||
},
|
||||
|
||||
registerGlobalEventHandlers: function () {
|
||||
|
Loading…
Reference in New Issue
Block a user