add WorkoutStateManager for ViewModel functionality
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user