Skip to content

Commit

Permalink
Merge pull request #161 from tillvit/development
Browse files Browse the repository at this point in the history
Remove offline use popoup, reload on refresh
  • Loading branch information
tillvit authored Dec 11, 2024
2 parents 033d9ba + 51d6f36 commit 10a806c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 1 addition & 7 deletions app/src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions app/src/gui/notification/CoreUpdateNotification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class CoreUpdateNotification extends UpdateNotification {
type: "confirm",
callback: () => {
callback()
window.location.reload()
},
},
],
Expand Down

0 comments on commit 10a806c

Please sign in to comment.