@@ -2,7 +2,7 @@ import { app, dialog, shell } from 'electron'
2
2
import { autoUpdater } from 'electron-updater'
3
3
import { t } from 'i18next'
4
4
5
- import { configStore , icon , isLinux } from '../constants'
5
+ import { icon , isLinux } from '../constants'
6
6
import { logError , logInfo , LogPrefix } from '../logger/logger'
7
7
import { captureException } from '@sentry/electron'
8
8
import { getFileSize } from '../utils'
@@ -12,11 +12,9 @@ import { getErrorMessage, removeCachedUpdatesFolder } from './utils'
12
12
// to test auto update on windows locally make sure you added the option verifyUpdateCodeSignature: false
13
13
// under build.win in electron-builder.yml and also change the app version to an old one there
14
14
15
- const appSettings = configStore . get_nodefault ( 'settings' )
16
- const shouldCheckForUpdates = appSettings ?. checkForUpdatesOnStartup === true
17
15
let newVersion : string
18
16
19
- autoUpdater . autoDownload = shouldCheckForUpdates && ! isLinux
17
+ autoUpdater . autoDownload = ! isLinux
20
18
autoUpdater . autoInstallOnAppQuit = true
21
19
22
20
let isAppUpdating = false
@@ -29,7 +27,7 @@ const MAX_UPDATE_ATTEMPTS = 10
29
27
const checkUpdateInterval = 3 * 1000 * 60 * 60
30
28
31
29
setInterval ( async ( ) => {
32
- if ( shouldCheckForUpdates && ! hasUpdated && ! isAppUpdating ) {
30
+ if ( ! hasUpdated && ! isAppUpdating ) {
33
31
logInfo ( 'Checking for client updates...' , LogPrefix . AutoUpdater )
34
32
await autoUpdater . checkForUpdates ( )
35
33
}
@@ -44,14 +42,6 @@ autoUpdater.on('update-available', async (info) => {
44
42
return
45
43
}
46
44
47
- if ( ! shouldCheckForUpdates ) {
48
- logInfo (
49
- 'New update available, but user has disabled auto updates' ,
50
- LogPrefix . AutoUpdater
51
- )
52
-
53
- return
54
- }
55
45
newVersion = info . version
56
46
57
47
trackEvent ( {
0 commit comments