Use onClosed instead of onSuspend
Renames extension.windows.beforeUnload to onSuspend, to match the underlying chrome api call. onClosed fires when the frontend app window is closed, while onSuspend fires when the background page is closed or refreshed (which amounts to an app restart). Frontend views are initialized iff the inbox window is opened, and so should always be listening to onClosed in order to know when they are no longer needed. // FREEBIE
This commit is contained in:
parent
038e263023
commit
f0dcf44b9f
4 changed files with 5 additions and 7 deletions
|
@ -116,7 +116,7 @@
|
|||
|
||||
new SocketView().render().$el.appendTo(this.$('.socket-status'));
|
||||
|
||||
extension.windows.beforeUnload(function() {
|
||||
extension.windows.onClosed(function() {
|
||||
this.inboxListView.stopListening();
|
||||
}.bind(this));
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue