diff options
Diffstat (limited to 'src/electron/ipc-api/autoUpdate.ts')
-rw-r--r-- | src/electron/ipc-api/autoUpdate.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/electron/ipc-api/autoUpdate.ts b/src/electron/ipc-api/autoUpdate.ts index bf3e79c85..14214aacb 100644 --- a/src/electron/ipc-api/autoUpdate.ts +++ b/src/electron/ipc-api/autoUpdate.ts | |||
@@ -7,10 +7,7 @@ const debug = require('../../preload-safe-debug')('Ferdium:ipcApi:autoUpdate'); | |||
7 | export default (params: { mainWindow: BrowserWindow; settings: any }) => { | 7 | export default (params: { mainWindow: BrowserWindow; settings: any }) => { |
8 | const enableUpdate = Boolean(params.settings.app.get('automaticUpdates')); | 8 | const enableUpdate = Boolean(params.settings.app.get('automaticUpdates')); |
9 | 9 | ||
10 | if (!enableUpdate) { | 10 | if (enableUpdate) { |
11 | autoUpdater.autoInstallOnAppQuit = false; | ||
12 | autoUpdater.autoDownload = false; | ||
13 | } else { | ||
14 | ipcMain.on('autoUpdate', (event, args) => { | 11 | ipcMain.on('autoUpdate', (event, args) => { |
15 | if (enableUpdate) { | 12 | if (enableUpdate) { |
16 | try { | 13 | try { |
@@ -71,5 +68,8 @@ export default (params: { mainWindow: BrowserWindow; settings: any }) => { | |||
71 | debug('update-error'); | 68 | debug('update-error'); |
72 | params.mainWindow.webContents.send('autoUpdate', { error }); | 69 | params.mainWindow.webContents.send('autoUpdate', { error }); |
73 | }); | 70 | }); |
71 | } else { | ||
72 | autoUpdater.autoInstallOnAppQuit = false; | ||
73 | autoUpdater.autoDownload = false; | ||
74 | } | 74 | } |
75 | }; | 75 | }; |