Skip to content

Commit 4efc2e4

Browse files
committed
Navigate to New Order screen instead of presenting it modally
1 parent 5dc700c commit 4efc2e4

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Creation/AddOrderCoordinator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private extension AddOrderCoordinator {
8484
///
8585
func presentNewOrderController() {
8686
let viewController = NewOrderHostingController()
87-
let newOrderNC = WooNavigationController(rootViewController: viewController)
88-
navigationController.present(newOrderNC, animated: true)
87+
viewController.hidesBottomBarWhenPushed = true
88+
navigationController.pushViewController(viewController, animated: true)
8989
}
9090
}

WooCommerce/WooCommerceTests/ViewRelated/Orders/Order Creation/AddOrderCoordinatorTests.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,9 @@ final class AddOrderCoordinatorTests: XCTestCase {
7474

7575
// When
7676
coordinator.start()
77-
waitUntil {
78-
coordinator.navigationController.presentedViewController != nil
79-
}
8077

8178
// Then
82-
let presentedNC = coordinator.navigationController.presentedViewController as? UINavigationController
83-
assertThat(presentedNC, isAnInstanceOf: WooNavigationController.self)
84-
assertThat(presentedNC?.topViewController, isAnInstanceOf: NewOrderHostingController.self)
79+
assertThat(coordinator.navigationController.topViewController, isAnInstanceOf: NewOrderHostingController.self)
8580
}
8681
}
8782

0 commit comments

Comments
 (0)