From c2c4202e808781ac2c4c53fa05c03b115c4985cb Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Mon, 25 Mar 2024 13:38:36 +0530 Subject: [PATCH] SDA-4507 - Force welcome screen in user config url is not configured correctly --- src/app/window-handler.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 0bd809ef2..9a7bd95f9 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -287,6 +287,13 @@ export class WindowHandler { (this.globalConfig.url.includes(this.defaultUrl) && config.isFirstTimeLaunch()) || !!this.config.enableBrowserLogin; + // Force welcome screen if pod url is not configured correctly + if ( + !!this.userConfig.url && + this.userConfig.url.includes(this.defaultUrl) + ) { + this.shouldShowWelcomeScreen = true; + } this.windowOpts = { ...this.getWindowOpts( @@ -596,11 +603,13 @@ export class WindowHandler { if (this.mainWebContents && !this.mainWebContents.isDestroyed()) { // Load welcome screen if (this.shouldShowWelcomeScreen && !this.didShowWelcomeScreen) { - const podUrl = this.userConfig.url - ? this.userConfig.url - : !this.globalConfig.url.includes(this.defaultUrl) - ? this.globalConfig.url - : undefined; + const podUrl = + this.userConfig.url && + !this.userConfig.url.includes(this.defaultUrl) + ? this.userConfig.url + : !this.globalConfig.url.includes(this.defaultUrl) + ? this.globalConfig.url + : undefined; this.mainWebContents.send('page-load-welcome', { locale: i18n.getLocale(), resources: i18n.loadedResources,