From 41ae49009ec01e1f95af32e934708e8500dc2997 Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Thu, 14 Oct 2021 23:20:17 +0200 Subject: [PATCH] [MM-39310] Add setTimeout to new server modal pop to make sure it renders correctly. (#1811) (#1815) (cherry picked from commit 6ae15b0cea6317ee4eb9abd45f6679225fe0e8b0) Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> --- src/main/main.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/main.ts b/src/main/main.ts index 49e3d78a..a8223bd8 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -718,13 +718,6 @@ function initializeAfterAppReady() { WindowManager.showMainWindow(deeplinkingURL); - // only check for non-Windows, as with Windows we have to wait for GPO teams - if (process.platform !== 'win32' || typeof config.registryConfigData !== 'undefined') { - if (config.teams.length === 0) { - handleNewServerModal(); - } - } - criticalErrorHandler.setMainWindow(WindowManager.getMainWindow()!); // listen for status updates and pass on to renderer @@ -797,6 +790,15 @@ function initializeAfterAppReady() { // is the requesting url trusted? callback(urlUtils.isTrustedURL(requestingURL, config.teams)); }); + + // only check for non-Windows, as with Windows we have to wait for GPO teams + if (process.platform !== 'win32' || typeof config.registryConfigData !== 'undefined') { + if (config.teams.length === 0) { + setTimeout(() => { + handleNewServerModal(); + }, 200); + } + } } //