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