From e8fdb8b8f93a9d1cfa2dba77181b2d2376465441 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 24 Sep 2024 19:45:59 +0200 Subject: [PATCH] fixed #9947 - window not showing up on first start --- app/lib/window.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/window.ts b/app/lib/window.ts index b7e71a97..57c2207f 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -108,7 +108,7 @@ export class Window { this.webContents = this.window.webContents - this.window.once('ready-to-show', () => { + this.window.webContents.once('did-finish-load', () => { if (process.platform === 'darwin') { this.window.setVibrancy(macOSVibrancyType) } else if (process.platform === 'win32' && this.configStore.appearance?.vibrancy) { @@ -139,7 +139,7 @@ export class Window { enableRemote(this.window.webContents) - this.window.loadURL(`file://${app.getAppPath()}/dist/index.html`, { extraHeaders: 'pragma: no-cache\n' }) + this.window.loadFile(path.join(app.getAppPath(), 'dist', 'index.html')) this.window.webContents.setVisualZoomLevelLimits(1, 1) this.window.webContents.setZoomFactor(1)