Skip to content

Commit

Permalink
Update mock transition.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdrobne committed Oct 11, 2023
1 parent dbcb10b commit 4ead99f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import SwiftUI
import SwiftUICoordinator

@MainActor
protocol CoordinatorFactory {
func makeShapesCoordinator(parent: Coordinator) -> ShapesCoordinator
func makeSimpleShapesCoordinator(parent: Coordinator) -> SimpleShapesCoordinator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUICoordinator

class MockTransition: NSObject, Transition {
func isEligible(from fromRoute: NavigationRoute, to toRoute: NavigationRoute, operation: NavigationOperation) -> Bool {
return true
return (fromRoute as? MockRoute == .circle && toRoute as? MockRoute == .rectangle)
}

func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
Expand Down

0 comments on commit 4ead99f

Please sign in to comment.