diff --git a/main/helpers/autoUpdate.js b/main/helpers/autoUpdate.js index e1cb19e..9b7974e 100644 --- a/main/helpers/autoUpdate.js +++ b/main/helpers/autoUpdate.js @@ -3,26 +3,26 @@ const { ipcMain } = require('electron'); const autoUpdate = (mainWindow) => { ipcMain.on('check-update', () => { - mainWindow.webContents.send('update-status', 'checking-for-update'); + mainWindow.webContents.send('update-status', { status: 'checking-for-update' }); autoUpdater.checkForUpdatesAndNotify(); }); autoUpdater.on('checking-for-update', () => { - mainWindow.webContents.send('update-status', 'checking-for-update'); + mainWindow.webContents.send('update-status', { status: 'checking-for-update' }); }); autoUpdater.on('update-available', () => { - mainWindow.webContents.send('update-status', 'update-available'); + mainWindow.webContents.send('update-status', { status: 'update-available' }); }); autoUpdater.on('update-not-available', () => { - mainWindow.webContents.send('update-status', 'update-not-available'); + mainWindow.webContents.send('update-status', { status: 'update-not-available' }); }); autoUpdater.on('update-downloaded', () => { - mainWindow.webContents.send('update-status', 'update-downloaded'); + mainWindow.webContents.send('update-status', { status: 'update-downloaded' }); }); autoUpdater.on('error', () => { - mainWindow.webContents.send('update-status', 'error'); + mainWindow.webContents.send('update-status', { status: 'error' }); }); autoUpdater.on('download-progress', ({ bytesPerSecond, percent, total }) => { - mainWindow.webContents.send('update-status', 'download-progress', bytesPerSecond, percent, total); + mainWindow.webContents.send('update-status', { status: 'download-progress', bytesPerSecond, percent, total }); }); ipcMain.on('update', () => { autoUpdater.quitAndInstall();