[MM-37863] Backport of MM-37863 to release-4.7 (#1705)

This commit is contained in:
Devin Binnie 2021-08-18 15:15:32 -04:00 committed by GitHub
parent a12796288d
commit e9c6c721dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,7 @@ let appVersion = null;
let config = null;
let authManager = null;
let certificateManager = null;
let didCheckForAddServerModal = false;
/**
* Main entry point for the application, ensures that everything initializes in the proper order
@ -273,6 +274,13 @@ function handleConfigSynchronize() {
if (app.isReady()) {
WindowManager.sendToRenderer(RELOAD_CONFIGURATION);
}
if (process.platform === 'win32' && !didCheckForAddServerModal && typeof config.registryConfigData.teams !== 'undefined') {
didCheckForAddServerModal = true;
if (config.teams.length === 0) {
handleNewServerModal();
}
}
}
function handleReloadConfig() {
@ -531,8 +539,11 @@ function initializeAfterAppReady() {
WindowManager.showMainWindow(deeplinkingURL);
if (config.teams.length === 0) {
WindowManager.showSettingsWindow();
// only check for non-Windows, as with Windows we have to wait for GPO teams
if (process.platform !== 'win32' || typeof config.registryConfigData.teams !== 'undefined') {
if (config.teams.length === 0) {
handleNewServerModal();
}
}
criticalErrorHandler.setMainWindow(WindowManager.getMainWindow());