feat(watch): refactor active workout into paged TabView with overview and controls

This commit is contained in:
2026-08-09 17:53:39 +02:00
parent acdf66bd84
commit 0979af288d
3 changed files with 120 additions and 25 deletions
+3
View File
@@ -40,6 +40,7 @@ class WorkoutManager: NSObject, ObservableObject, HKLiveWorkoutBuilderDelegate {
private var stationarySince: Date?
@Published var lapDetected = false
@Published var healthKitAuthorized = false
@Published var isPaused = false
override init() {
super.init()
@@ -170,6 +171,7 @@ class WorkoutManager: NSObject, ObservableObject, HKLiveWorkoutBuilderDelegate {
stopLapDetection()
stopHeartRateQuery()
stopCalorieQuery()
isPaused = true
WKInterfaceDevice.current().play(.notification)
}
@@ -178,6 +180,7 @@ class WorkoutManager: NSObject, ObservableObject, HKLiveWorkoutBuilderDelegate {
startLapDetection()
startHeartRateQuery()
startCalorieQuery()
isPaused = false
WKInterfaceDevice.current().play(.start)
}