Replace BuildWorkout with ChooseWorkout, enforce single workout#62
Open
Tyler-Lopez wants to merge 2 commits into
Open
Replace BuildWorkout with ChooseWorkout, enforce single workout#62Tyler-Lopez wants to merge 2 commits into
Tyler-Lopez wants to merge 2 commits into
Conversation
- Rename buildWorkouts package to chooseWorkout; ChooseWorkoutScreen shows a single selected workout (or empty state) rather than a list - ChooseWorkoutViewModel holds Workout? instead of List<Workout>; removes add/delete list logic - Rename AddWorkoutDestination → CreateWorkoutDestination to match the already-named CreateWorkoutScreen composable - PlayWorkoutVIewModel now accepts a single Workout, dropping the unused currentWorkoutIndex / multi-workout traversal path - Route.PlayWorkout takes Workout instead of List<Workout> - Home destination, event, and ViewModel updated to NavigateToChooseWorkout - String resources renamed from build_workouts_* to choose_workout_* in both EN and ES locales Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename addWorkoutScreen package to createWorkoutScreen - AddWorkoutViewModel → CreateWorkoutViewModel - AddWorkoutViewEvent → CreateWorkoutViewEvent - AddWorkoutPage → CreateWorkoutPage - AddWorkoutViewModelFactory → CreateWorkoutViewModelFactory - String resource keys add_workout_* → create_workout_* in EN and ES Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tyler-Lopez
commented
May 11, 2026
|
|
||
|
|
||
| @Composable | ||
| fun ChooseWorkoutScreen(viewModel: ChooseWorkoutViewModel) { |
Owner
Author
There was a problem hiding this comment.
Everything to do with BuildWorkout has been changed to ChooseWorkout I thought this made a lot more sense. The code is all the same, though.
Tyler-Lopez
commented
May 11, 2026
| class PlayWorkoutVIewModel( | ||
| private val router: Router<PlayWorkoutDestination>, | ||
| private val workouts: List<Workout>, | ||
| private val workout: Workout, |
Owner
Author
There was a problem hiding this comment.
PlayWorkout changed to only take a single Workout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
When we started work on the app, we weren't totally sure what we wanted to do with the data models.
Something we did, that we later regretted, was building the app around the idea of multiple Workouts. Instead of this, we should just have a single Workout.
This commit sets the application up for this new future, by eliminating multiple workouts.
Future Work
I plan to make the
ChooseWorkoutscreen to allow you to choose from the Workouts saved in the database. When a Workout is created, it will be added to the database automatically and automatically selected.Right now
ChooseWorkoutis a little messy. The future commit will make a lot more sense.