-
Notifications
You must be signed in to change notification settings - Fork 34
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
Setting numberOfSets in Update Code Causes Extra Set To Be Added If/When Program Is Reloaded #219
Comments
Hmm, I can see that people may expect it work both ways - that Feels like instead I should introduce |
Yea that could work too!
It's just weird right now where Then, only once you've completed all the sets for the day, it seems to make So basically in the test program:
Another annoyance is you may not see this issue until the end of the workout because it added sets to exercises you already completed earlier, and since the entire workout reloads if you change things for later exercises this issue still happens to the exercises you aren't even looking at anymore. So unless you review your session before hitting finish or understand the "are you sure?" prompt that comes up when you hit finish is because there are now incomplete extra sets that were added to earlier exercises, it'll end up saving the workout with blank/incomplete sets which are confusing when you get to the workout summary screen. Hopefully that makes sense. |
Basically, if you increment
numberOfSets
inside theupdate(setIndex == 0)
call and you've already completed all sets for a given exercise it seems to be adding an extra set beyond what it should.Here's how to reproduce using this test program:
targetRepsMin
and/ortargetRepsMax
state variables to cause the workout to reloadsetsModifier
variable should only be incrementingnumberOfSets
by 1 in theupdate
call to make a total of 2 sets, but you end up with 3.If you complete the 3rd extra set and then do step 4 again you'll get another extra set added and so on...
Seems like it may be saving the modified
numberOfSets
value from the initial update call rather than re-reading thenumberOfsets
defined in the program file when reloading the program.The text was updated successfully, but these errors were encountered: