mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 08:43:57 +00:00
checking for updates moved into app-ready
This commit is contained in:
@@ -206,6 +206,12 @@ ipcMain.on('app-started', async (event, arg) => {
|
|||||||
if (autoUpdater.isUpdaterActive()) {
|
if (autoUpdater.isUpdaterActive()) {
|
||||||
mainWindow.webContents.send('setAppUpdaterActive');
|
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) => {
|
ipcMain.on('window-action', async (event, arg) => {
|
||||||
if (!mainWindow) {
|
if (!mainWindow) {
|
||||||
@@ -485,12 +491,6 @@ autoUpdater.on('error', error => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function onAppReady() {
|
function onAppReady() {
|
||||||
if (!process.env.DEVMODE) {
|
|
||||||
if (settingsJson['app.autoUpdateMode'] != 'skip') {
|
|
||||||
autoUpdater.autoDownload = settingsJson['app.autoUpdateMode'] == 'download';
|
|
||||||
autoUpdater.checkForUpdates();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
createWindow();
|
createWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user