diff --git a/FloatingSpace/UiObject.js b/FloatingSpace/UiObject.js index 1ce03c594..0e9f16202 100644 --- a/FloatingSpace/UiObject.js +++ b/FloatingSpace/UiObject.js @@ -732,6 +732,12 @@ function newUiObject () { } } + function resetValue () { + currentValue = undefined + hasValue = false + valueCounter = 0 + } + function setPercentage (percentage, counter) { if (percentage !== undefined) { currentPercentage = percentage @@ -744,6 +750,12 @@ function newUiObject () { } } + function resetPercentage () { + currentPercentage = undefined + hasPercentage = false + percentageCounter = 0 + } + function setStatus (status, counter) { if (status !== undefined) { currentStatus = status @@ -756,6 +768,12 @@ function newUiObject () { } } + function resetStatus () { + currentStatus = undefined + hasStatus = false + statusCounter = 0 + } + function heartBeat () { lastHeartBeat = new Date() thisObject.isRunning = true @@ -771,6 +789,9 @@ function newUiObject () { function run (pEventsServerClient, callBackFunction) { finalizeEventsServerClient() resetErrorMessage() + resetPercentage() + resetValue() + resetStatus() eventsServerClient = pEventsServerClient /* We setup the circular progress bar. */