From: zhaosy Date: Thu, 10 Aug 2023 03:56:46 +0000 (+0800) Subject: [WRTjs] Fix SplashScreen instance is not destroyed in VIDEOFINISHED case X-Git-Tag: submit/tizen/20230816.160022^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5f8dbc3124971b45d44676916ce97e91e44dcfc;p=platform%2Fframework%2Fweb%2Fwrtjs.git [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 --- 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() {