[Splash] Move updater init to async with splash load

This commit is contained in:
Ducko 2021-12-16 22:14:55 +00:00
parent 3e1a7ab81a
commit 78a4df22f4

View file

@ -335,6 +335,12 @@ function initSplash(startMinimized = false) {
log('Splash', 'Quickstart config:', process.env.OPENASAR_QUICKSTART || oaConfig.quickstart, '-', process.env.OPENASAR_QUICKSTART, oaConfig.quickstart);
if (newUpdater != null) {
updateUntilCurrent();
} else {
moduleUpdater.installPendingUpdates();
}
if (process.env.OPENASAR_QUICKSTART || oaConfig.quickstart) setTimeout(() => {
destroySplash();
@ -348,12 +354,12 @@ function initSplash(startMinimized = false) {
NodeModule.globalPaths.push(_path.default.join(modulesDir, moduleCoreDir)); // Add to globalPaths for requiring
}
if (newUpdater != null) {
/* if (newUpdater != null) {
updateUntilCurrent();
} else {
moduleUpdater.installPendingUpdates();
moduleUpdater.setInBackground();
}
} */
launchMainWindow();
@ -469,12 +475,6 @@ function launchSplashWindow(startMinimized) {
if (splashWindow && !startMinimized) {
splashWindow.show();
}
if (newUpdater != null) {
updateUntilCurrent();
} else {
moduleUpdater.installPendingUpdates();
}
});
_ipcMain.default.on('SPLASH_SCREEN_QUIT', () => {