Skip to content
Snippets Groups Projects
Commit 9af09de7 authored by David Baker's avatar David Baker
Browse files

Dispatch notifier_enabled when permission given if we don't already have it.

parent aaa96f1a
No related merge requests found
......@@ -55,17 +55,24 @@ module.exports = {
global.Notification.requestPermission(function() {
if (callback) {
callback();
dis.dispatch({
action: "notifier_enabled",
value: true
});
}
});
}
if (!global.localStorage) return;
global.localStorage.setItem('notifications_enabled', 'true');
if (this.havePermission) {
dis.dispatch({
action: "notifier_enabled",
value: true
});
}
}
else {
if (!global.localStorage) return;
global.localStorage.setItem('notifications_enabled', 'false');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment