Move notification listeners to background
Otherwise they will be re-registered by the frontend page. // FREEBIE
This commit is contained in:
parent
3bf9e36ead
commit
eb1cfe9b70
2 changed files with 19 additions and 18 deletions
|
@ -170,24 +170,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
if (chrome.notifications) {
|
||||
chrome.notifications.onClicked.addListener(function() {
|
||||
chrome.notifications.clear('signal');
|
||||
Whisper.Notifications.onclick();
|
||||
});
|
||||
chrome.notifications.onButtonClicked.addListener(function() {
|
||||
chrome.notifications.clear('signal');
|
||||
Whisper.Notifications.clear();
|
||||
getInboxCollection().each(function(model) {
|
||||
model.markRead();
|
||||
});
|
||||
});
|
||||
chrome.notifications.onClosed.addListener(function(id, byUser) {
|
||||
if (byUser) {
|
||||
Whisper.Notifications.clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
extension.notify = function(options) {
|
||||
if (chrome) {
|
||||
chrome.notifications.clear('signal');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue