Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetProgress sets progress to maxProgress if the old progress was higher than maxProgress #42

Open
bart1998 opened this issue Apr 9, 2020 · 0 comments

Comments

@bart1998
Copy link

bart1998 commented Apr 9, 2020

I think there is a small bug in this library. For example: when you set the max progress to 20 and the progress to 15, then set the max progress to 10 and the progress to 5, the actual progress will be set to 10 because of this line.

This is a very easy fix, just change if (progress ... to if (value ... so that it checks the actual progress you set.

The use case where i am facing this is in a recyclerview. Here i have different max progress and progress values in each entry for a leveling system. As rows get recycled the max progress is changed before the progress.

A quick workaround (without changing the library) is to set the progress to 0 before changing the maxProgress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant