diff --git a/desktop/src/app.ts b/desktop/src/app.ts index 918905bb..c3ccb23f 100644 --- a/desktop/src/app.ts +++ b/desktop/src/app.ts @@ -34,11 +34,10 @@ function init() { }); // This method will be called when Electron has finished loading - app.on("ready", async () => { + app.whenReady().then(async () => { await settings.init(); - const logLevel = settings.get("log_level"); - setLogLevel(logLevel || "info"); + setLogLevel(settings.get("log_level") || "info"); autoUpdater.init(); diff --git a/desktop/src/window.ts b/desktop/src/window.ts index 429a314b..5bf6708e 100644 --- a/desktop/src/window.ts +++ b/desktop/src/window.ts @@ -84,13 +84,11 @@ export function createWindow() { }); mainWindow.once("ready-to-show", () => { - (async () => { - // appView?.webContents.openDevTools({ - // mode: "detach", - // }); - mainWindow?.show(); - // mainWindow?.webContents.openDevTools({ mode: "detach" }); - })(); + // appView?.webContents.openDevTools({ + // mode: "detach", + // }); + mainWindow?.show(); + // mainWindow?.webContents.openDevTools({ mode: "detach" }); }); mainWindow.webContents.on("did-finish-load", () => {