Delay showing mainWindow until Electron is ready

This commit is contained in:
Xander Frangos
2022-08-27 20:12:17 -04:00
parent b8641592ba
commit d84baee1d8

View File

@@ -36,6 +36,7 @@ app.on("ready", async () => {
height: 700,
minHeight: 500,
minWidth: 500,
show: false,
backgroundColor: "#171717",
webPreferences: {
devTools: isDev,
@@ -62,6 +63,8 @@ app.on("ready", async () => {
return { action: "deny" };
});
mainWindow.once("ready-to-show", () => { mainWindow.show(); })
if (!isDev) {
autoUpdater.checkForUpdates();
}