Fix exceptions on window close

The stopListening function was being passed the close event as an
argument, which caused it to throw.

// FREEBIE
This commit is contained in:
lilia 2017-04-04 18:42:58 -07:00 committed by Scott Nonnenberg
parent 49cdc98386
commit 25b0fbd949
No known key found for this signature in database
GPG key ID: A4931C09644C654B

View file

@ -25,7 +25,9 @@
this.listenTo(this.model.messageCollection, 'add remove', updateLastMessage);
this.listenTo(this.model, 'newmessage', updateLastMessage);
extension.windows.onClosed(this.stopListening.bind(this));
extension.windows.onClosed(function() {
this.stopListening();
}.bind(this));
this.timeStampView = new Whisper.TimestampView({brief: true});
this.model.updateLastMessage();
},