mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-04-30 20:52:27 +00:00
move pin validation error screen to initial view resolution
This commit is contained in:
@ -109,6 +109,9 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
} else if (Settings.getConfigUrl().length() == 0) {
|
} else if (Settings.getConfigUrl().length() == 0) {
|
||||||
// System.println("HomeAssistantApp getInitialView(): No configuration URL in the application settings.");
|
// System.println("HomeAssistantApp getInitialView(): No configuration URL in the application settings.");
|
||||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoConfigUrl) as Lang.String + ".");
|
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoConfigUrl) as Lang.String + ".");
|
||||||
|
} else if (Settings.getPin() == null) {
|
||||||
|
// System.println("HomeAssistantApp getInitialView(): Invalid PIN in application settings.");
|
||||||
|
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.SettingsPinError) as Lang.String);
|
||||||
} else if (! System.getDeviceSettings().phoneConnected) {
|
} else if (! System.getDeviceSettings().phoneConnected) {
|
||||||
// System.println("HomeAssistantApp getInitialView(): No Phone connection, skipping API call.");
|
// System.println("HomeAssistantApp getInitialView(): No Phone connection, skipping API call.");
|
||||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||||
|
@ -167,9 +167,6 @@ class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static function getPin() as Lang.String or Null {
|
static function getPin() as Lang.String or Null {
|
||||||
if (mPin == null) {
|
|
||||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.SettingsPinError) as Lang.String);
|
|
||||||
}
|
|
||||||
return mPin;
|
return mPin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user