Fixed refresh all. Fixed Updating Methods. Removed Jira Widget.

This commit is contained in:
Patrick Fic
2020-11-06 08:10:34 -08:00
parent 8b775ee494
commit 83f7188822
8 changed files with 68 additions and 50 deletions

View File

@@ -249,12 +249,13 @@ function createTray() {
// autoUpdater.on("checking-for-update", () => {
// log.log("Checking for update...");
// });
// autoUpdater.on("update-available", (ev, info) => {
// log.log("Update available.");
// });
// autoUpdater.on("update-not-available", (ev, info) => {
// log.log("Update not available.");
// });
autoUpdater.on("update-available", (ev) => {
log.log("Update available.", ev);
mainWindow.webContents.send(ipcTypes.app.toRenderer.updateAvailable, ev);
});
autoUpdater.on("update-not-available", (ev) => {
log.log("Update not available.", ev);
});
autoUpdater.on("error", (ev, err) => {
log.log("Error in auto-updater.", ev, err);
@@ -327,15 +328,16 @@ autoUpdater.on("update-downloaded", (ev, info) => {
async function checkForUpdates() {
try {
log.info("Checking for updates.");
const result = await autoUpdater.checkForUpdates();
const { updateInfo } = result;
//const result = await
autoUpdater.checkForUpdates();
// const { updateInfo } = result;
if (updateInfo.version !== app.getVersion()) {
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);
}