nkfoss / ohm-str

0 stars 0 forks source link

Bodyweight persistence bug #37

Closed nkfoss closed 4 years ago

nkfoss commented 4 years ago

If you enter a bodyweight into a workout for a given date, that value will persist in the workoutService when you navigate to different dates (this is regardless of whether the date you navigated to already has a bodyweight record).

nkfoss commented 4 years ago

The problem lies in the Set-list initialization. First there is a check to see if the workout service has a bodyweight value in the workout. If so, it sets the bodyweight variable in the setlist. Else, the set-list BW is null.

Second, fetchRecords() is called for the workoutService. Practically, this should happen before ANY check for bodyweight/workout happens.