fuck youuuuuuuuuuuuuuuu

This commit is contained in:
Henry Jameson 2023-12-13 22:23:56 +02:00
parent e0eaf961c4
commit a3733eae60

View file

@ -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) {