a few fixups
This commit is contained in:
parent
8bbead315d
commit
f4b0f1dbef
|
@ -16,20 +16,21 @@ function init(container) {
|
||||||
try {
|
try {
|
||||||
localStorage.getItem(focusTrackerKey);
|
localStorage.getItem(focusTrackerKey);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
liveEnabled = false;
|
|
||||||
Em.Logger.info('Discourse desktop notifications are disabled - localStorage denied.');
|
Em.Logger.info('Discourse desktop notifications are disabled - localStorage denied.');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
liveEnabled = true;
|
liveEnabled = true;
|
||||||
Em.Logger.info('Discourse desktop notifications are enabled.');
|
Em.Logger.info('Discourse desktop notifications are enabled.');
|
||||||
}).then(function() {
|
return true;
|
||||||
try {
|
}).then(function(c) {
|
||||||
init2(container);
|
if (c) {
|
||||||
} catch (e) {
|
try {
|
||||||
console.error(e);
|
init2(container);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catch(function(e) {
|
}).catch(function(e) {
|
||||||
debugger;
|
|
||||||
liveEnabled = false;
|
liveEnabled = false;
|
||||||
Em.Logger.info('Discourse desktop notifications are disabled - permission denied.');
|
Em.Logger.info('Discourse desktop notifications are disabled - permission denied.');
|
||||||
});
|
});
|
||||||
|
@ -145,6 +146,10 @@ function onNotification(currentUser) {
|
||||||
tag: notificationTagName
|
tag: notificationTagName
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// if (enableSound) {
|
||||||
|
// soundElement.play();
|
||||||
|
// }
|
||||||
|
|
||||||
const firstUnseen = unseen[0];
|
const firstUnseen = unseen[0];
|
||||||
|
|
||||||
function clickEventHandler() {
|
function clickEventHandler() {
|
||||||
|
|
Loading…
Reference in New Issue