mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-18 20:38:39 +00:00
New glance and widget views
Added ability to test if we're a widget or a watch-app. Added troubleshooting documentation.
This commit is contained in:
@ -106,10 +106,21 @@ class ErrorView extends ScalableView {
|
||||
create(text); // Ignore returned values
|
||||
if (!mShown) {
|
||||
WatchUi.pushView(instance, instance.getDelegate(), WatchUi.SLIDE_UP);
|
||||
// This must be last to avoid a race condition with unShow(), where the
|
||||
// ErrorView can't be dismissed.
|
||||
mShown = true;
|
||||
}
|
||||
}
|
||||
|
||||
static function unShow() as Void {
|
||||
if (mShown) {
|
||||
WatchUi.popView(WatchUi.SLIDE_DOWN);
|
||||
// This must be last to avoid a race condition with show(), where the
|
||||
// ErrorView can't be dismissed.
|
||||
mShown = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Internal show now we're not a static method like 'show()'.
|
||||
function setText(text as Lang.String) as Void {
|
||||
mText = text;
|
||||
@ -119,13 +130,6 @@ class ErrorView extends ScalableView {
|
||||
}
|
||||
}
|
||||
|
||||
static function unShow() as Void {
|
||||
if (mShown) {
|
||||
mShown = false;
|
||||
WatchUi.popView(WatchUi.SLIDE_DOWN);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ErrorDelegate extends WatchUi.BehaviorDelegate {
|
||||
|
Reference in New Issue
Block a user