diff --git a/source/HomeAssistantPinConfirmation.mc b/source/HomeAssistantPinConfirmation.mc index 436dd39..0a01b99 100644 --- a/source/HomeAssistantPinConfirmation.mc +++ b/source/HomeAssistantPinConfirmation.mc @@ -237,8 +237,8 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate { if (mTimer != null) { mTimer.stop(); } - mConfirmMethod.invoke(mState); WatchUi.popView(WatchUi.SLIDE_RIGHT); + mConfirmMethod.invoke(mState); } else { error(); } diff --git a/source/HomeAssistantToggleMenuItem.mc b/source/HomeAssistantToggleMenuItem.mc index e3bf4a9..be2e51c 100644 --- a/source/HomeAssistantToggleMenuItem.mc +++ b/source/HomeAssistantToggleMenuItem.mc @@ -256,7 +256,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { url = url + id.substring(0, id.find(".")) + "/turn_off"; } - if (! phoneConnected && ! internetAvailable && Settings.getWifiLteExecutionEnabled()) { + if ((! phoneConnected || ! internetAvailable) && Settings.getWifiLteExecutionEnabled()) { var dialogMsg = WatchUi.loadResource($.Rez.Strings.WifiLtePrompt) as Lang.String; var dialog = new WatchUi.Confirmation(dialogMsg); WatchUi.pushView( @@ -334,5 +334,5 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { function onConfirm(b as Lang.Boolean) as Void { setState(b); } - + } diff --git a/source/WifiLteExecutionConfirmDelegate.mc b/source/WifiLteExecutionConfirmDelegate.mc index 5477213..0a4b5f4 100644 --- a/source/WifiLteExecutionConfirmDelegate.mc +++ b/source/WifiLteExecutionConfirmDelegate.mc @@ -47,7 +47,7 @@ class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate { :state as Lang.Boolean } or Null) { ConfirmationDelegate.initialize(); - + if (WatchUi has :showToast) { mHasToast = true; } @@ -77,6 +77,7 @@ class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate { //! @param response The user's confirmation response as `WatchUi.Confirm` //! @return Always returns `true` to indicate the response was handled. function onResponse(response) as Lang.Boolean { + getApp().getQuitTimer().reset(); if (mTimer != null) { mTimer.stop(); }