Launch the watch from the exercise-list start path too

The "Start This Split" button on a split's exercise list minted and
saved the workout but never called WorkoutLauncher, so the Apple Watch
never came up when starting from there — only the home-screen split
picker launched it. Inject AppServices into ExerciseListView and call
launchWatchWorkout from start(), mirroring the picker path.

Claude-Session: https://claude.ai/code/session_01PVNBVKp5bcq52X722uMjwT
This commit is contained in:
2026-07-09 15:24:01 -04:00
parent 41226545e3
commit f01e149269
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -1,5 +1,7 @@
**July 2026**
Starting a workout with a split's Start This Split button now brings it up on your Apple Watch too, matching how starting one from the main list already worked.
A new Auto-Advance option lets a split flow hands-free from one exercise to the next, resting automatically between them.
Each split can now set its own rest time, overriding the app-wide default in Settings.
@@ -13,6 +13,7 @@ import SwiftData
struct ExerciseListView: View {
@Environment(SyncEngine.self) private var sync
@Environment(AppServices.self) private var services
@Environment(\.dismiss) private var dismiss
// Resolve the split by id, not a captured entity: editing a seed's exercise from
@@ -221,6 +222,9 @@ struct ExerciseListView: View {
await sync.save(workout: doc)
pendingWorkoutID = doc.id
}
// Bring the Apple Watch up into the session so the user can run it from the wrist,
// tagged with the split's activity type mirroring the split-picker start path.
services.workoutLauncher.launchWatchWorkout(activityType: split.activityTypeEnum.hkActivityType)
}
private func addExercises(names: [String]) {