mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-04-30 20:52:27 +00:00
Update HomeAssistantApp.mc
Fixed debug printing where the method name was wrong. Changes in commented out debug code only.
This commit is contained in:
@ -109,10 +109,10 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
// 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 (! System.getDeviceSettings().phoneConnected) {
|
} else if (! System.getDeviceSettings().phoneConnected) {
|
||||||
// System.println("HomeAssistantApp fetchMenuConfig(): 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 + ".");
|
||||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||||
// System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call.");
|
// System.println("HomeAssistantApp getInitialView(): No Internet connection, skipping API call.");
|
||||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||||
} else {
|
} else {
|
||||||
var isCached = fetchMenuConfig();
|
var isCached = fetchMenuConfig();
|
||||||
@ -218,7 +218,7 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
}
|
}
|
||||||
if (menu == null) {
|
if (menu == null) {
|
||||||
if (! System.getDeviceSettings().phoneConnected) {
|
if (! System.getDeviceSettings().phoneConnected) {
|
||||||
// System.println("HomeAssistantApp getState(): No Phone connection, skipping API call.");
|
// System.println("HomeAssistantApp fetchMenuConfig(): No Phone connection, skipping API call.");
|
||||||
if (mIsGlance) {
|
if (mIsGlance) {
|
||||||
WatchUi.requestUpdate();
|
WatchUi.requestUpdate();
|
||||||
} else {
|
} else {
|
||||||
@ -226,7 +226,7 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
}
|
}
|
||||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||||
// System.println("HomeAssistantApp getState(): No Internet connection, skipping API call.");
|
// System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call.");
|
||||||
if (mIsGlance) {
|
if (mIsGlance) {
|
||||||
WatchUi.requestUpdate();
|
WatchUi.requestUpdate();
|
||||||
} else {
|
} else {
|
||||||
@ -345,7 +345,7 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
WatchUi.requestUpdate();
|
WatchUi.requestUpdate();
|
||||||
} else {
|
} else {
|
||||||
if (! System.getDeviceSettings().phoneConnected) {
|
if (! System.getDeviceSettings().phoneConnected) {
|
||||||
// System.println("HomeAssistantApp getState(): No Phone connection, skipping API call.");
|
// System.println("HomeAssistantApp fetchApiStatus(): No Phone connection, skipping API call.");
|
||||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||||
if (mIsGlance) {
|
if (mIsGlance) {
|
||||||
WatchUi.requestUpdate();
|
WatchUi.requestUpdate();
|
||||||
@ -353,7 +353,7 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||||
}
|
}
|
||||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||||
// System.println("HomeAssistantApp getState(): No Internet connection, skipping API call.");
|
// System.println("HomeAssistantApp fetchApiStatus(): No Internet connection, skipping API call.");
|
||||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||||
if (mIsGlance) {
|
if (mIsGlance) {
|
||||||
WatchUi.requestUpdate();
|
WatchUi.requestUpdate();
|
||||||
|
Reference in New Issue
Block a user