Panagiotis Triantafyllou

fixed steps

...@@ -419,7 +419,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -419,7 +419,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
419 EventBus.getDefault().register(this); 419 EventBus.getDefault().register(this);
420 420
421 if (mWebviewLoaded) { 421 if (mWebviewLoaded) {
422 - String scriptSourceInit = "webviewDidFocus(" + String.valueOf(mWebviewLoaded) + ");"; 422 + String scriptSourceInit = "webviewDidFocus(" + String.valueOf(mWebviewLoaded) + "," + String.valueOf(isMyServiceRunning(WarplyHealthService.class)) + ");";
423 WarpView.this.evaluateJavascript(scriptSourceInit, s -> { 423 WarpView.this.evaluateJavascript(scriptSourceInit, s -> {
424 424
425 }); 425 });
...@@ -784,10 +784,6 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -784,10 +784,6 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
784 @Override 784 @Override
785 public void onPageFinished(WebView view, String url) { 785 public void onPageFinished(WebView view, String url) {
786 mWebviewLoaded = true; 786 mWebviewLoaded = true;
787 - String scriptSourceInit = "webviewDidFocus(" + String.valueOf(mWebviewLoaded) + ");";
788 - view.evaluateJavascript(scriptSourceInit, s -> {
789 -
790 - });
791 787
792 String scriptSource = "passParams(" + WarpUtils.getWebviewParams(getContext()) + ");"; 788 String scriptSource = "passParams(" + WarpUtils.getWebviewParams(getContext()) + ");";
793 view.evaluateJavascript(scriptSource, s -> { 789 view.evaluateJavascript(scriptSource, s -> {
......