[Splash > QuickStart] Tweak timing for new updater, add config flag to enable as well as an env

This commit is contained in:
Ducko 2021-12-09 21:42:27 +00:00
parent 1f1736bcc3
commit a5b7624b5c
1 changed files with 3 additions and 3 deletions

View File

@ -329,13 +329,13 @@ function initSplash(startMinimized = false) {
_ipcMain.default.on('UPDATED_QUOTES', (_event, quotes) => cacheLatestQuotes(quotes)); _ipcMain.default.on('UPDATED_QUOTES', (_event, quotes) => cacheLatestQuotes(quotes));
if (process.env.OPENASAR_QUICKSTART) setTimeout(() => { if (process.env.OPENASAR_QUICKSTART || oaConfig.quickstart) setTimeout(() => {
destroySplash(); destroySplash();
if (newUpdater != null) { if (newUpdater != null) {
updateUntilCurrent(); updateUntilCurrent();
} else { } else {
// moduleUpdater.installPendingUpdates(); moduleUpdater.installPendingUpdates();
moduleUpdater.setInBackground(); moduleUpdater.setInBackground();
} }
@ -344,7 +344,7 @@ function initSplash(startMinimized = false) {
setTimeout(() => { setTimeout(() => {
events.emit(APP_SHOULD_SHOW); events.emit(APP_SHOULD_SHOW);
}, 100); }, 100);
}, 50); }, newUpdater != null ? 500 : 50);
} }
function destroySplash() { function destroySplash() {