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
This commit is contained in:
lilia 2016-02-10 11:21:39 -08:00
parent 4198987723
commit 1f2dfc5ea9
1 changed files with 0 additions and 4 deletions

View File

@ -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([]);
}