Package update + update to auto-updater.

This commit is contained in:
Patrick Fic
2020-10-28 06:44:24 -07:00
parent 8d6c37723b
commit 11c3b7a36d
2 changed files with 8 additions and 5 deletions

View File

@@ -327,10 +327,13 @@ async function checkForUpdates() {
log.info("Checking for updates.");
const result = await autoUpdater.checkForUpdates();
const { updateInfo } = result;
mainWindow.webContents.send(
ipcTypes.app.toRenderer.updateAvailable,
updateInfo
);
if (updateInfo.version !== app.getVersion()) {
mainWindow.webContents.send(
ipcTypes.app.toRenderer.updateAvailable,
updateInfo
);
}
} catch (error) {
log.error("Error while checking for update", error);
}