Review comment

Moved point of application exit for the menu item option.
This commit is contained in:
Philip Abbey
2025-07-10 19:46:04 +01:00
parent 842a31a1cc
commit d141c03104
3 changed files with 20 additions and 10 deletions

View File

@ -215,6 +215,9 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
}
getApp().setApiStatus(status);
if (mExit) {
System.exit();
}
}
//! Set the state of the toggle menu item.
@ -297,9 +300,6 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
//
function onConfirm(b as Lang.Boolean) as Void {
setState(b);
if (mExit) {
System.exit();
}
}
}