From 3942361010a8ee2d897493565926a10406c96736 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Tue, 12 Mar 2024 10:50:22 +0530 Subject: [PATCH] SDA-4494 - Force welcome screen in user config url is not configured correctly (#2107) --- src/app/window-handler.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 0bd809ef..bb7dfa20 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -287,6 +287,9 @@ export class WindowHandler { (this.globalConfig.url.includes(this.defaultUrl) && config.isFirstTimeLaunch()) || !!this.config.enableBrowserLogin; + // Force welcome screen if pod url is not configured correctly + this.shouldShowWelcomeScreen = + !!this.userConfig.url && this.userConfig.url.includes(this.defaultUrl); this.windowOpts = { ...this.getWindowOpts( @@ -596,11 +599,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,