diff --git a/app/actions/layout.js b/app/actions/layout.js index 94c79f3..c6c823e 100644 --- a/app/actions/layout.js +++ b/app/actions/layout.js @@ -55,3 +55,9 @@ export function notifyProgress(progress: ProgressInfo) { type: PROGRESS, progress }; } + +export function clearErrors() { + return { + type: CLEAR_ERRORS + }; +} diff --git a/app/index.js b/app/index.js index b3b1100..5a2ea43 100644 --- a/app/index.js +++ b/app/index.js @@ -77,6 +77,10 @@ ipcRenderer.on('update-available', () => { store.dispatch(layoutActions.alert('An update is being downloaded, please wait...', [])); }); +ipcRenderer.on('update-not-available', () => { + store.dispatch(layoutActions.clearErrors()); +}); + ipcRenderer.on('update-progress', (event, progress) => { store.dispatch(layoutActions.notifyProgress(progress)); }); diff --git a/app/updater.js b/app/updater.js index e9f4f23..cc760e8 100644 --- a/app/updater.js +++ b/app/updater.js @@ -14,6 +14,7 @@ export default class Updater { autoUpdater.on('error', err => mainWindow.webContents.send('update-error', err.toString())); autoUpdater.on('checking-for-update', () => mainWindow.webContents.send('checking-for-update')); autoUpdater.on('update-available', () => mainWindow.webContents.send('update-available')); + autoUpdater.on('update-not-available', () => mainWindow.webContents.send('update-not-available')); autoUpdater.on('update-downloaded', () => autoUpdater.quitAndInstall()); autoUpdater.on('download-progress', (progress: ProgressInfo) => mainWindow.webContents.send('update-progress', progress));