Largely cosmetic

Removed debug that escaped.
Belt & braces field to prevent the update chain being started twice.
This commit is contained in:
Philip Abbey
2024-07-26 18:23:22 +01:00
parent 9eed5affdc
commit a213c6851e
3 changed files with 14 additions and 14 deletions

View File

@ -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();
}
}