mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-19 12:58:49 +00:00
Largely cosmetic
Removed debug that escaped. Belt & braces field to prevent the update chain being started twice.
This commit is contained in:
@ -39,6 +39,7 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
private var mIsGlance as Lang.Boolean = false;
|
||||
private var mIsApp as Lang.Boolean = false; // Or Widget
|
||||
private var mIsInitUpdateCompl as Lang.Boolean = false;
|
||||
private var mUpdating as Lang.Boolean = false; // Don't start a second chain of updates
|
||||
|
||||
function initialize() {
|
||||
AppBase.initialize();
|
||||
@ -262,11 +263,12 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
}
|
||||
|
||||
function startUpdates() {
|
||||
if (mHaMenu != null) {
|
||||
if (mHaMenu != null and !mUpdating) {
|
||||
mItemsToUpdate = mHaMenu.getItemsToUpdate();
|
||||
// Start the continuous update process that continues for as long as the application is running.
|
||||
// The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.
|
||||
if (mItemsToUpdate.size() > 0) {
|
||||
mUpdating = true;
|
||||
updateNextMenuItemInternal();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user