Mark all notifications as seen syncs all tabs

This commit is contained in:
2018-03-20 18:27:57 +01:00
parent d6efc2b861
commit 24b0036617
3 changed files with 61 additions and 40 deletions

View File

@ -11,12 +11,10 @@ export class ServiceWorkerManager {
register() {
if(!("serviceWorker" in navigator)) {
console.log("service worker not supported, skipping registration")
console.warn("service worker not supported, skipping registration")
return
}
console.log("register service worker")
navigator.serviceWorker.register(this.uri).then(registration => {
// registration.update()
})
@ -74,6 +72,7 @@ export class ServiceWorkerManager {
switch(message.type) {
case "new notification":
case "notifications marked as seen":
this.arn.notificationManager.update()
break