Merge branch 'notifications-thru-sw' into shigusegubu-vue3

This commit is contained in:
Henry Jameson 2023-10-25 19:35:52 +03:00
commit b8f344b22d

View file

@ -62,7 +62,7 @@ self.addEventListener('message', async (event) => {
const { title, body, icon, id } = content
if (state.notificationIds.has(id)) return
state.notificationIds.add(id)
setTimeout(() => state.notificationIds.remove(id), 10000)
setTimeout(() => state.notificationIds.delete(id), 10000)
self.registration.showNotification('SWTEST: ' + title, { body, icon })
}