Skip to content

A local-first personal finance app

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

Matiss Janis Aboltins914cc6503eea
diff --git a/packages/desktop-client/src/components/settings/Reset.tsx b/packages/desktop-client/src/components/settings/Reset.tsx
index 0d61e5f823..6f391ad549 100644
--- a/packages/desktop-client/src/components/settings/Reset.tsx
+++ b/packages/desktop-client/src/components/settings/Reset.tsx
@@ -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();
}
diff --git a/upcoming-release-notes/6119.md b/upcoming-release-notes/6119.md
new file mode 100644
index 0000000000..f3b27daaaf
--- /dev/null
+++ b/upcoming-release-notes/6119.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MatissJanis]
+---
+
+ForceReload: change web update logic from .reload() to .applyAppUpdate()