Update counter on push notifications
This commit is contained in:
parent
79da84956e
commit
fe33054f31
@ -67,9 +67,13 @@ export default class ServiceWorkerManager {
|
||||
}
|
||||
|
||||
onMessage(evt: MessageEvent) {
|
||||
// let message = JSON.parse(evt.data)
|
||||
let message = JSON.parse(evt.data)
|
||||
|
||||
switch(message.type) {
|
||||
case "new notification":
|
||||
this.arn.notificationManager.update()
|
||||
break
|
||||
|
||||
// switch(message.type) {
|
||||
// case "new content":
|
||||
// if(message.url.includes("/_/")) {
|
||||
// // Content reload
|
||||
@ -85,9 +89,9 @@ export default class ServiceWorkerManager {
|
||||
|
||||
// break
|
||||
|
||||
// // case "offline":
|
||||
// // this.arn.statusMessage.showError("You are viewing an offline version of the site now.")
|
||||
// // break
|
||||
// }
|
||||
// case "offline":
|
||||
// this.arn.statusMessage.showError("You are viewing an offline version of the site now.")
|
||||
// break
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user