Skip to content

Build your personal knowledge base with Trilium Notes

fix(desktop): protected session not refreshing while app is in background (closes #7761)

Elian Dorandf4fa42acda3
diff --git a/apps/client/src/services/utils.ts b/apps/client/src/services/utils.ts
index 74de008845..bc35a0bd3f 100644
--- a/apps/client/src/services/utils.ts
+++ b/apps/client/src/services/utils.ts
@@ -14,7 +14,9 @@ export function reloadFrontendApp(reason?: string) {
}
if (isElectron()) {
- dynamicRequire("@electron/remote").BrowserWindow.getFocusedWindow()?.reload();
+ for (const window of dynamicRequire("@electron/remote").BrowserWindow.getAllWindows()) {
+ window.reload();
+ }
} else {
window.location.reload();
}