Ignore multiple ready-to-show event 37/203137/2
authorSangYong Park <sy302.park@samsung.com>
Wed, 10 Apr 2019 06:19:22 +0000 (15:19 +0900)
committerSangYong Park <sy302.park@samsung.com>
Wed, 10 Apr 2019 06:35:41 +0000 (15:35 +0900)
ready-to-show event is occurred when web page is first rendered.
but, multiple ready-to-show event shows web page in preload mode.

Change-Id: I134f02fe1ce3acc31880c7e0c2d4c19abd233c1f
Signed-off-by: SangYong Park <sy302.park@samsung.com>
wrt_app/src/web_application.js

index b9c9e3a..e4e9676 100755 (executable)
@@ -60,6 +60,8 @@ class WebApplication {
     handleEvents(options) {
         var self = this;
         this.mainWindow.on('ready-to-show', function() {
+            if (self.firstRendered)
+                return;
             console.log('mainWindow ready-to-show');
             wrt.hideSplashScreen(1);
             self.firstRendered = true;