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() }, }, ],