Changed tap response to use a toast

This commit is contained in:
Philip Abbey
2023-11-03 17:09:15 +00:00
parent c926aab75f
commit 8ad95063f0
4 changed files with 12 additions and 7 deletions

View File

@ -59,13 +59,10 @@ class HomeAssistantMenuItem extends WatchUi.MenuItem {
if (Globals.debug) {
System.println("HomeAssistantMenuItem Note - onReturnExecScript(): Correct script executed.");
}
new Alert({
:timeout => Globals.tapTimeout,
:font => Graphics.FONT_SYSTEM_MEDIUM,
:text => (d[i].get("attributes") as Lang.Dictionary).get("friendly_name"),
:fgcolor => Graphics.COLOR_WHITE,
:bgcolor => Graphics.COLOR_BLACK
}).pushView(WatchUi.SLIDE_IMMEDIATE);
WatchUi.showToast(
(d[i].get("attributes") as Lang.Dictionary).get("friendly_name") as Lang.String,
null
);
}
}
}