add WorkoutStateManager for ViewModel functionality

This commit is contained in:
Felix Förtsch
2024-11-23 16:12:39 +01:00
parent 1668b29803
commit 1c177c5336
18 changed files with 355 additions and 338 deletions
@@ -14,6 +14,20 @@ class NavigationManager: ObservableObject {
path = NavigationPath()
path.append(destination)
}
func popToRoot() {
path = NavigationPath()
}
func pop() {
if !path.isEmpty {
path.removeLast()
}
}
func push(_ destination: NavigationDestination) {
path.append(destination)
}
}
enum NavigationDestination: Hashable {