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) {
|
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":
|
// case "new content":
|
||||||
// if(message.url.includes("/_/")) {
|
// if(message.url.includes("/_/")) {
|
||||||
// // Content reload
|
// // Content reload
|
||||||
@ -85,9 +89,9 @@ export default class ServiceWorkerManager {
|
|||||||
|
|
||||||
// break
|
// break
|
||||||
|
|
||||||
// // case "offline":
|
// case "offline":
|
||||||
// // this.arn.statusMessage.showError("You are viewing an offline version of the site now.")
|
// this.arn.statusMessage.showError("You are viewing an offline version of the site now.")
|
||||||
// // break
|
// break
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user