From b5f8dbc3124971b45d44676916ce97e91e44dcfc Mon Sep 17 00:00:00 2001 From: zhaosy Date: Thu, 10 Aug 2023 11:56:46 +0800 Subject: [PATCH] [WRTjs] Fix SplashScreen instance is not destroyed in VIDEOFINISHED case SplashScreen instance is not destroyed in VIDEOFINISHED case, it caused app can't show to foreground. Related patch: https://review.tizen.org/gerrit/297080/ Change-Id: If3c44a252113c4f3900a087cdc49cc7967c50c49 Signed-off-by: zhaosy --- wrt_app/src/web_application.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index b4e7c4e..5c49209 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -184,29 +184,31 @@ export class WebApplication { } hideSplashScreen(reason: string) { + let hideReason = 0; switch (reason) { case 'first-paint': { - if (wrt.hideSplashScreen(0) !== false) - this.show(); + hideReason = 0; break; } case 'complete': { - if (wrt.hideSplashScreen(1) !== false) - this.show(); + hideReason = 1; break; } case 'custom': { - if (wrt.hideSplashScreen(2) !== false) - this.show(); + hideReason = 2; break; } case 'video-finished': { - this.show(); + hideReason = 3; break; } default: - break; + console.log('hideReason: ' + hideReason); + return; } + + if (wrt.hideSplashScreen(hideReason) !== false) + this.show(); } private setupMainWindowEventListener() { -- 2.7.4