fix: downloading update toast now showing up

This commit is contained in:
NoCrypt 2024-08-16 00:18:13 +07:00
parent c89651fbbc
commit d4028526c1

View file

@ -10,9 +10,6 @@ autoUpdater.autoDownload = false
ipcMain.on('update', async () => {
await autoUpdater.checkForUpdates()
})
ipcMain.on('update-download', async () => {
await autoUpdater.downloadUpdate()
})
// ipcMain.on('quit-and-install') is on electron/src/main/app.js#L138
@ -34,6 +31,10 @@ export default class Updater {
this.hasUpdate = true
window.webContents.send('update-downloaded', true)
})
ipcMain.on('update-download', async () => {
await autoUpdater.downloadUpdate()
window.webContents.send('update-downloading', true)
})
}
install (forceRunAfter = false) {