Skip to content

Commit

Permalink
[Fix/UX] Check config before calling autoupdater (#3530)
Browse files Browse the repository at this point in the history
Check config before calling autoupdater
  • Loading branch information
arielj authored Feb 8, 2024
1 parent 4c8ae63 commit c669900
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async function initializeWindow(): Promise<BrowserWindow> {
}, 5000)
}

GlobalConfig.get()
const globalConf = GlobalConfig.get().getSettings()

mainWindow.setIcon(icon)
app.commandLine.appendSwitch('enable-spatial-navigation')
Expand Down Expand Up @@ -253,7 +253,9 @@ async function initializeWindow(): Promise<BrowserWindow> {
} else {
Menu.setApplicationMenu(null)
mainWindow.loadURL(`file://${path.join(publicDir, '../build/index.html')}`)
autoUpdater.checkForUpdates()
if (globalConf.checkForUpdatesOnStartup) {
autoUpdater.checkForUpdates()
}
}

// Changelog links workaround
Expand Down

0 comments on commit c669900

Please sign in to comment.