fix(electron): allow extra window to reload (#7567)

This commit is contained in:
SngAbc
2025-11-01 22:02:17 +08:00
committed by GitHub
parent 3f0b0f9b62
commit 6d4b87888a

View File

@@ -11,7 +11,11 @@ export function reloadFrontendApp(reason?: string) {
logInfo(`Frontend app reload: ${reason}`);
}
window.location.reload();
if (isElectron()) {
dynamicRequire("@electron/remote").BrowserWindow.getFocusedWindow()?.reload();
} else {
window.location.reload();
}
}
export function restartDesktopApp() {