Fix two server manager issues (#2727)

This commit is contained in:
Devin Binnie
2023-05-20 11:39:32 -04:00
committed by GitHub
parent 2ed851c2a4
commit a87e770c73
2 changed files with 8 additions and 0 deletions

View File

@@ -238,6 +238,10 @@ export class ServerManager extends EventEmitter {
this.currentServerId = this.serverOrder[0];
}
if (!this.hasServers()) {
delete this.currentServerId;
}
this.persistServers();
}

View File

@@ -38,6 +38,10 @@ function handleShowOnboardingScreens(showWelcomeScreen: boolean, showNewServerMo
log.debug('handleShowOnboardingScreens', {showWelcomeScreen, showNewServerModal, mainWindowIsVisible});
if (showWelcomeScreen) {
if (ModalManager.isModalDisplayed()) {
return;
}
handleWelcomeScreenModal();
if (process.env.NODE_ENV === 'test') {