ForceReload: change web update logic from .reload() to .applyAppUpdate() (#6119)

This commit is contained in:
Matiss Janis Aboltins
2025-11-11 23:21:21 +00:00
committed by GitHub
parent b142cf6cda
commit 914cc6503e
2 changed files with 8 additions and 5 deletions

View File

@@ -97,13 +97,10 @@ export function ForceReload() {
setReloading(true);
try {
if (isElectron()) {
// For Electron, use location.reload()
window.location.reload();
} else {
// For browser, use Actual.reload() which unregisters service worker
// and forces a fresh load
if (window.Actual?.reload) {
await window.Actual.reload();
if (window.Actual?.applyAppUpdate) {
await window.Actual.applyAppUpdate();
} else {
window.location.reload();
}

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatissJanis]
---
ForceReload: change web update logic from .reload() to .applyAppUpdate()