Reverse if condition
This commit is contained in:
parent
24b0036617
commit
2dae63412f
@ -30,15 +30,15 @@ export async function markNotificationsAsSeen(arn: AnimeNotifier) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Update notification counter
|
// Update notification counter
|
||||||
if(!("serviceWorker" in navigator)) {
|
if("serviceWorker" in navigator) {
|
||||||
// If there is no service worker, update the counter on this tab
|
|
||||||
arn.notificationManager.update()
|
|
||||||
} else {
|
|
||||||
// If we have service worker support, broadcast the "notifications marked as seen" message to all open tabs
|
// If we have service worker support, broadcast the "notifications marked as seen" message to all open tabs
|
||||||
arn.serviceWorkerManager.postMessage({
|
arn.serviceWorkerManager.postMessage({
|
||||||
type: "broadcast",
|
type: "broadcast",
|
||||||
realType: "notifications marked as seen"
|
realType: "notifications marked as seen"
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
// If there is no service worker, update the counter on this tab
|
||||||
|
arn.notificationManager.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update notifications
|
// Update notifications
|
||||||
|
Loading…
Reference in New Issue
Block a user