Initial solution

For optional confirmation dialogue box.
This commit is contained in:
Philip Abbey
2023-12-01 09:15:59 +00:00
parent 3fe48be756
commit 0ab9cb800a
41 changed files with 148 additions and 21 deletions

View File

@ -89,13 +89,19 @@ class HomeAssistantMenuItemFactory {
);
}
function tap(label as Lang.String or Lang.Symbol, identifier as Lang.Object or Null, service as Lang.String or Null) as WatchUi.MenuItem {
function tap(
label as Lang.String or Lang.Symbol,
identifier as Lang.Object or Null,
service as Lang.String or Null,
confirm as Lang.Boolean
) as WatchUi.MenuItem {
if (bRepresentTypesWithLabels) {
return new HomeAssistantMenuItem(
label,
strMenuItemTap,
identifier,
service,
confirm,
mMenuItemOptions,
mHomeAssistantService
);
@ -105,6 +111,7 @@ class HomeAssistantMenuItemFactory {
null,
identifier,
service,
confirm,
mTapTypeIcon,
mMenuItemOptions,
mHomeAssistantService