mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-17 03:48:32 +00:00
Added confirmation of tap event and amended delegate decoding of actions.
This commit is contained in:
@ -57,6 +57,13 @@ class HomeAssistantMenuItem extends WatchUi.MenuItem {
|
|||||||
if (Globals.debug) {
|
if (Globals.debug) {
|
||||||
System.println("HomeAssistantMenuItem Note - onReturnExecScript(): Correct script executed.");
|
System.println("HomeAssistantMenuItem Note - onReturnExecScript(): Correct script executed.");
|
||||||
}
|
}
|
||||||
|
new Alert({
|
||||||
|
:timeout => Globals.alertTimeout,
|
||||||
|
: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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,16 +148,8 @@ class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSwipe(swipeEvent) as Lang.Boolean {
|
function onBack() {
|
||||||
switch (swipeEvent.getDirection()) {
|
WatchUi.popView(WatchUi.SLIDE_RIGHT);
|
||||||
case WatchUi.SWIPE_RIGHT:
|
|
||||||
WatchUi.popView(WatchUi.SLIDE_RIGHT);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// Do nothing
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Reference in New Issue
Block a user