fuck youuuuuuuuuuuuuuuu
This commit is contained in:
parent
e0eaf961c4
commit
a3733eae60
1 changed files with 8 additions and 10 deletions
|
@ -59,10 +59,9 @@ const setSettings = async () => {
|
|||
}
|
||||
|
||||
const showPushNotification = async (event) => {
|
||||
const activeClients = await getWindowClients()
|
||||
// const activeClients = await getWindowClients()
|
||||
await setSettings()
|
||||
// Only show push notifications if all tabs/windows are closed
|
||||
if (activeClients.length === 0) {
|
||||
const data = event.data.json()
|
||||
|
||||
const url = `${self.registration.scope}api/v1/notifications/${data.notification_id}`
|
||||
|
@ -74,7 +73,6 @@ const showPushNotification = async (event) => {
|
|||
|
||||
return self.registration.showNotification(res.title, res)
|
||||
}
|
||||
}
|
||||
|
||||
self.addEventListener('push', async (event) => {
|
||||
if (event.data) {
|
||||
|
|
Loading…
Add table
Reference in a new issue