From efe70a77dd5feb667e1867f5eed625e43cdb778e Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 15 Mar 2026 08:02:51 +0100 Subject: [PATCH] Tauri detection (future) --- client/boot.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/boot.ts b/client/boot.ts index 5bed395e..8b42eea2 100644 --- a/client/boot.ts +++ b/client/boot.ts @@ -148,7 +148,13 @@ safeRun(async () => { console.log("Booting SilverBullet client"); console.log("Boot config", bootConfig, config.values); - if (localStorage.getItem("enableSW") !== "0" && navigator.serviceWorker) { + // If Tauri: then no SW + const isTauri = !!(window as any).__TAURI__; + if ( + !isTauri && + localStorage.getItem("enableSW") !== "0" && + navigator.serviceWorker + ) { // Register service worker const workerURL = new URL("service_worker.js", document.baseURI); let startNotificationCount = 0;