add NavigationManager for programatic navigation from the root

This commit is contained in:
Felix Förtsch
2024-11-04 14:43:47 +01:00
parent c722d59aff
commit 19b3d89010
6 changed files with 73 additions and 12 deletions

View File

@@ -24,6 +24,9 @@ final class WorkoutSessionItem: Nameable, Positionable {
var actualReps: Int?
var actualValue: Double?
var startDate: Date?
var stopDate: Date?
init(workoutSession: WorkoutSession, planned: WorkoutItem) {
self.workoutSession = workoutSession
self.name = planned.exercise.name
@@ -33,4 +36,7 @@ final class WorkoutSessionItem: Nameable, Positionable {
self.unit = planned.unit
self.metric = planned.metric
}
func start() { startDate = .now }
func stop() { stopDate = .now }
}