Changeset View
Changeset View
Standalone View
Standalone View
desktop/src/auto-update.js
Show All 19 Lines | if (!currentTimeout) { | ||||
}, updateIntervalMs); | }, updateIntervalMs); | ||||
} | } | ||||
}; | }; | ||||
scheduleCheckForUpdates(); | scheduleCheckForUpdates(); | ||||
autoUpdater.on('update-not-available', scheduleCheckForUpdates); | autoUpdater.on('update-not-available', scheduleCheckForUpdates); | ||||
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { | |||||
autoUpdater.setFeedURL({ url: getUpdateUrl(releaseName) }); | |||||
scheduleCheckForUpdates(); | |||||
}); | |||||
autoUpdater.on('error', error => { | autoUpdater.on('error', error => { | ||||
console.error(error); | console.error(error); | ||||
scheduleCheckForUpdates(); | scheduleCheckForUpdates(); | ||||
}); | }); | ||||
ipcMain.on('update-to-new-version', () => autoUpdater.quitAndInstall()); | ipcMain.on('update-to-new-version', () => autoUpdater.quitAndInstall()); | ||||
} | } |