summaryrefslogtreecommitdiff
path: root/web-build/expo-service-worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-build/expo-service-worker.js')
-rw-r--r--web-build/expo-service-worker.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/web-build/expo-service-worker.js b/web-build/expo-service-worker.js
deleted file mode 100644
index 50b4b60..0000000
--- a/web-build/expo-service-worker.js
+++ /dev/null
@@ -1 +0,0 @@
-self.addEventListener("message",t=>{let i;if("string"===typeof t.data)try{i=JSON.parse(t.data)}catch(e){}i&&i.fromExpoWebClient&&(self.notificationIcon=i.fromExpoWebClient.notificationIcon)}),self.addEventListener("push",t=>{let i={};try{i=t.data.json()}catch(a){i={title:"",body:t.data.text()}}const e=i.title,n=i.data||i.custom||{},o={body:i.body,data:n};o.icon=n._icon||i.icon||self.notificationIcon||null,o.image=n._richContent&&n._richContent.image?o.data._richContent.image:i.image,o.tag=n._tag||i.collapseKey,o.tag&&(o.renotify=n._renotify),t.waitUntil(self.registration.showNotification(e,o))}),self.addEventListener("notificationclick",t=>{t.notification.close(),t.waitUntil((async()=>{const i=await self.clients.matchAll({includeUncontrolled:!0});let e;const n=t.notification.data._webPath||"/";for(const t of i){if(new URL(t.url).pathname===n){t.focus(),e=t;break}}e||(e=await self.clients.openWindow(n)),e.postMessage({origin:"selected",data:t.notification.data,remote:!t.notification._isLocal})})())}),self.importScripts("service-worker.js"); \ No newline at end of file