Stop Progress ElapsedTimeRemaining from updating #1672
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes issue #1472. I read the issue and thought it should not be too hard and perfrect for a first PR. It turns out it is caused due to StopTime not being set when the maxValue is reached. I simply added one line to fix this which fixed the issue.
Changes
The issue occurs due to StopTime not being set when the MaxValue is readed. The Isfinished bool checks both StopTime and Value > MaxValue, but since the ElapsedTime simple checks whether StopTime is set, and that is never set except when StopTask is called this keeps on counting. By adding the assignment to StopTime in the Update method when _value > _maxValue this fixes the issue.
P.S. I did not comment on the issue since it is not a behaviour change but simply a bugfix.
Please upvote 👍 this pull request if you are interested in it.