From 51d6f36e9b8c2604564cf732d2d9c7ee55f56c44 Mon Sep 17 00:00:00 2001 From: tillvit Date: Tue, 10 Dec 2024 22:31:31 -0500 Subject: [PATCH] Remove offline use popoup, reload on refresh --- app/src/App.ts | 8 +------- app/src/gui/notification/CoreUpdateNotification.ts | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/src/App.ts b/app/src/App.ts index 7bd103b1..cba3bcc4 100644 --- a/app/src/App.ts +++ b/app/src/App.ts @@ -22,7 +22,6 @@ import { MenubarManager } from "./gui/element/MenubarManager" import { WaterfallManager } from "./gui/element/WaterfallManager" import { AppUpdateNotification } from "./gui/notification/AppUpdateNotification" import { CoreUpdateNotification } from "./gui/notification/CoreUpdateNotification" -import { OfflineUpdateNotification } from "./gui/notification/OfflineUpdateNotification" import { DebugWidget } from "./gui/widget/DebugWidget" import { ChangelogWindow } from "./gui/window/ChangelogWindow" import { DirectoryWindow } from "./gui/window/DirectoryWindow" @@ -488,12 +487,7 @@ export class App { } checkCoreVersion() { - const update = registerSW({ - onOfflineReady() { - OfflineUpdateNotification.open() - console.log("Offline use ready") - }, - }) + const update = registerSW({}) navigator.serviceWorker.addEventListener("controllerchange", () => { CoreUpdateNotification.open(update) console.log("Found new version") diff --git a/app/src/gui/notification/CoreUpdateNotification.ts b/app/src/gui/notification/CoreUpdateNotification.ts index c83842d0..37f824eb 100644 --- a/app/src/gui/notification/CoreUpdateNotification.ts +++ b/app/src/gui/notification/CoreUpdateNotification.ts @@ -16,6 +16,7 @@ export class CoreUpdateNotification extends UpdateNotification { type: "confirm", callback: () => { callback() + window.location.reload() }, }, ],