a few fixups

This commit is contained in:
riking 2015-04-08 12:17:59 -07:00
parent 8bbead315d
commit f4b0f1dbef
1 changed files with 13 additions and 8 deletions

View File

@ -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() {
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() {