mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-08-01 17:38:40 +00:00
Initial version with "auto quit"
Quit the application after a user settable period of time based on a timeout value from the settings.
This commit is contained in:
@ -107,7 +107,23 @@ class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate {
|
||||
Menu2InputDelegate.initialize();
|
||||
}
|
||||
|
||||
function onBack() {
|
||||
getApp().getQuitTimer().reset();
|
||||
WatchUi.popView(WatchUi.SLIDE_RIGHT);
|
||||
}
|
||||
|
||||
// Only for CheckboxMenu
|
||||
function onDone() {
|
||||
getApp().getQuitTimer().reset();
|
||||
}
|
||||
|
||||
// Only for CustomMenu
|
||||
function onFooter() {
|
||||
getApp().getQuitTimer().reset();
|
||||
}
|
||||
|
||||
function onSelect(item as WatchUi.MenuItem) as Void {
|
||||
getApp().getQuitTimer().reset();
|
||||
if (item instanceof HomeAssistantToggleMenuItem) {
|
||||
var haToggleItem = item as HomeAssistantToggleMenuItem;
|
||||
if (Globals.scDebug) {
|
||||
@ -147,8 +163,9 @@ class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
function onBack() {
|
||||
WatchUi.popView(WatchUi.SLIDE_RIGHT);
|
||||
// Only for CustomMenu
|
||||
function onTitle() {
|
||||
getApp().getQuitTimer().reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user