Only update notification on add

Previously, notifications were persistent until explicitly dismissed
from the notification center (a bell icon in the system tray), but that
ui has been removed from chrome*, so now updating on remove is
unexpectedly creating a new notification pop up.

*http://blog.chromium.org/2015/10/streamlining-notifications-on-desktop.html

Fixes #667

// FREEBIE
pull/749/head
lilia 9 years ago
parent 4198987723
commit 1f2dfc5ea9

@ -8,7 +8,6 @@
Whisper.Notifications = new (Backbone.Collection.extend({
initialize: function() {
this.on('add', this.onAdd);
this.on('remove', this.onRemove);
},
isEnabled: function(callback) {
return Notification.permission === 'granted' &&
@ -83,9 +82,6 @@
extension.notification.clear();
this.update();
},
onRemove: function() {
this.update();
},
clear: function() {
this.reset([]);
}

Loading…
Cancel
Save