File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
WooCommerce/Classes/ViewRelated/Orders/Order Creation Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ final class NewOrderHostingController: UIHostingController<NewOrder> {
1616
1717 // Needed because a `SwiftUI` cannot be dismissed when being presented by a UIHostingController
1818 rootView. dismissHandler = { [ weak self] in
19- self ? . checkUnsavedChangesAndDismissIfPossible ( )
19+ self ? . dismiss ( animated : true )
2020 }
2121 }
2222
@@ -75,17 +75,6 @@ extension NewOrderHostingController: UIAdaptivePresentationControllerDelegate {
7575/// Private methods
7676///
7777private extension NewOrderHostingController {
78- func checkUnsavedChangesAndDismissIfPossible( ) {
79- guard !viewModel. hasChanges else {
80- presentDiscardChangesActionSheet ( onDiscard: { [ weak self] in
81- self ? . discardOrderAndDismiss ( )
82- } )
83- return
84- }
85-
86- dismiss ( animated: true )
87- }
88-
8978 func presentDiscardChangesActionSheet( onDiscard: @escaping ( ) -> Void ) {
9079 UIAlertController . presentDiscardChangesActionSheet ( viewController: self , onDiscard: onDiscard)
9180 }
You can’t perform that action at this time.
0 commit comments