mirror of
https://github.com/dbgate/dbgate
synced 2024-09-20 05:13:05 +00:00
checking for updates moved into app-ready
This commit is contained in:
parent
11e8cff77e
commit
0ea84fe034
@ -206,6 +206,12 @@ ipcMain.on('app-started', async (event, arg) => {
|
||||
if (autoUpdater.isUpdaterActive()) {
|
||||
mainWindow.webContents.send('setAppUpdaterActive');
|
||||
}
|
||||
if (!process.env.DEVMODE) {
|
||||
if (settingsJson['app.autoUpdateMode'] != 'skip') {
|
||||
autoUpdater.autoDownload = settingsJson['app.autoUpdateMode'] == 'download';
|
||||
autoUpdater.checkForUpdates();
|
||||
}
|
||||
}
|
||||
});
|
||||
ipcMain.on('window-action', async (event, arg) => {
|
||||
if (!mainWindow) {
|
||||
@ -485,12 +491,6 @@ autoUpdater.on('error', error => {
|
||||
});
|
||||
|
||||
function onAppReady() {
|
||||
if (!process.env.DEVMODE) {
|
||||
if (settingsJson['app.autoUpdateMode'] != 'skip') {
|
||||
autoUpdater.autoDownload = settingsJson['app.autoUpdateMode'] == 'download';
|
||||
autoUpdater.checkForUpdates();
|
||||
}
|
||||
}
|
||||
createWindow();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user