Conversation
…et.kt to include a possible WarmupId instead of ExerciseId
…UiWarmup and UiWarmupWithSets. Also updated UiSet.kt to follow Set with an optional warmupId for linking to warmups instead of exercises. Includes adding warmupsWithSets for UiWorkoutWithExercisesAndSets.kt.
… and warmups using their wrapper UiWorkoutItem classes
Includes "Warmup", "Target", "Add warmup", the default warmup mode "40/60/70"
…iExerciseWithSets whilst retaining full functionality. This is mostly done with drop-in replacements, but filtering by class (UiWarmupItem or UiExerciseItem) for specific functions like updateExerciseSetMode or updateWarmupSetMode
…replaced with "workout items" and warmups by properly renaming temporary variables. (Basically cleaning up my laziness).
Update saving workout with exercises and sets to include saving warmups with the exercises
…orrect string in strings.xml
…th have the same id as they are in different tables. Warmups are prefixed with "w" and exercises with "e"
…at the screen view models can be guaranteed to be initalised with the correct exercises and warmups.
IamDg
left a comment
There was a problem hiding this comment.
Hi,
Thank you for your contribution and pretty big PR!
I looked at the code and ran the debug apk. As far as I understood, the idea is to add warmups as card alongside exercise card, right?
Let me propose this other idea inspired from other workouts apps: instead of adding warmups as "exercises", what about adding them as sets? I think they would be more intuitive for the user and simpler for us to implement.
Here's an image from another workout app to give a better view:
Let me know what do you think!
|
Hey - sorry only just got round to coming back to this.
That's probably a good idea and possibly would've saved a lot of headache! Definitely from a UX perspective it makes more sense and would probably make features like automatic set recalculation based on the first set a lot easier. I've give it another crack and see how it feels |
Good! Take your time |

This PR adds warmups to workouts.
Currently there is only one warmup "type", but more can easily be added.
Warmups can be added from the "More options" button on the exercise card.
Issue #98