ConversationView: when windows are closed, call unload()
Anyway, unload() is a more comprehensive method for doing what the close handler was trying to do before. FREEBIE
This commit is contained in:
parent
6f1a2a9b3e
commit
c0f8812f9b
1 changed files with 3 additions and 5 deletions
|
@ -163,11 +163,7 @@
|
|||
this.window.addEventListener('focus', this.onFocus);
|
||||
|
||||
extension.windows.onClosed(function () {
|
||||
this.window.removeEventListener('resize', onResize);
|
||||
this.window.removeEventListener('focus', onFocus);
|
||||
window.autosize.destroy(this.$messageField);
|
||||
this.remove();
|
||||
this.model.messageCollection.reset([]);
|
||||
this.unload();
|
||||
}.bind(this));
|
||||
|
||||
this.fetchMessages();
|
||||
|
@ -250,6 +246,8 @@
|
|||
this.window.removeEventListener('resize', this.onResize);
|
||||
this.window.removeEventListener('focus', this.onFocus);
|
||||
|
||||
window.autosize.destroy(this.$messageField);
|
||||
|
||||
this.view.remove();
|
||||
|
||||
this.remove();
|
||||
|
|
Loading…
Add table
Reference in a new issue