Remove redundant Window hide on suspend as it is handled by platform 66/199166/6 accepted/tizen/unified/20190212.084110 submit/tizen/20190212.024052
authorsurya.kumar7 <surya.kumar7@samsung.com>
Wed, 6 Feb 2019 12:04:05 +0000 (17:34 +0530)
committersurya.kumar7 <surya.kumar7@samsung.com>
Mon, 11 Feb 2019 14:46:18 +0000 (20:16 +0530)
JSWRT need not explicitly call window.hide() during App loop's suspend
event as platform is directly responsible for that

Change-Id: I9f91fed65f373f5fbbab12588660a8d04bea3524
Signed-off-by: surya.kumar7 <surya.kumar7@samsung.com>
wrt_app/src/web_application.js

index e3cf6da..8c04e1b 100755 (executable)
@@ -86,22 +86,22 @@ class WebApplication {
     }
     suspend() {
         console.log('WebApplication : suspend');
-        BrowserWindow.getAllWindows().forEach((window) => {
-            window.hide();
-            if (!this.backgroundSupport)
+        if (!this.backgroundSupport) {
+            BrowserWindow.getAllWindows().forEach((window) => {
                 window.setEnabled(false);
-        });
+            });
+        }
     }
     resume() {
         console.log('WebApplication : resume');
         if (!this.firstRendered) {
             return;
         }
-        BrowserWindow.getAllWindows().forEach((window) => {
-            window.show();
-            if (!this.backgroundSupport)
+        if (!this.backgroundSupport) {
+            BrowserWindow.getAllWindows().forEach((window) => {
                 window.setEnabled(true);
-        });
+            });
+        }
     }
 }
 module.exports = WebApplication;