preperations for update dialog

This commit is contained in:
2024-01-19 16:24:39 +01:00
parent 61d5182854
commit 8d61a8b2b7
7 changed files with 60 additions and 9 deletions

View File

@@ -572,9 +572,12 @@ function createWindow() {
// Emitted when the window is ready to be shown
// This helps in showing the window gracefully.
mainWindow.once("ready-to-show", async () => {
const hasUpdate = await updateAvailable();
console.log({ hasUpdate });
const updateInfo = await updateAvailable();
if (!updateInfo.update) {
mainWindow.webContents.send("ezpplauncher:update", updateInfo.release);
}
mainWindow.show();
mainWindow.focus();
});
}