Skip to content

Commit 5dc700c

Browse files
committed
Remove unused code
1 parent e72c90f commit 5dc700c

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ final class AddOrderCoordinator: Coordinator {
4949
private extension AddOrderCoordinator {
5050
func presentOrderTypeBottomSheet() {
5151
let viewProperties = BottomSheetListSelectorViewProperties(title: nil)
52-
let command = OrderTypeBottomSheetListSelectorCommand(selected: nil) { selectedBottomSheetOrderType in
52+
let command = OrderTypeBottomSheetListSelectorCommand() { selectedBottomSheetOrderType in
5353
self.navigationController.dismiss(animated: true)
5454
self.presentOrderCreationFlow(bottomSheetOrderType: selectedBottomSheetOrderType)
5555
}
56-
command.data = [.full, .quick]
5756
let productTypesListPresenter = BottomSheetListSelectorPresenter(viewProperties: viewProperties, command: command)
5857
productTypesListPresenter.show(from: navigationController, sourceView: sourceView, sourceBarButtonItem: sourceBarButtonItem, arrowDirections: .any)
5958
}

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,8 @@ final class OrderTypeBottomSheetListSelectorCommand: BottomSheetListSelectorComm
5555

5656
private let onSelection: (BottomSheetOrderType) -> Void
5757

58-
init(selected: BottomSheetOrderType?, onSelection: @escaping (BottomSheetOrderType) -> Void) {
58+
init(onSelection: @escaping (BottomSheetOrderType) -> Void) {
5959
self.onSelection = onSelection
60-
61-
/// Remove from `data` the selected product type, so that it is not shown in the list.
62-
data.removeAll { (productType) -> Bool in
63-
productType == selected
64-
}
6560
}
6661

6762
func configureCell(cell: ImageAndTitleAndTextTableViewCell, model: BottomSheetOrderType) {
@@ -77,8 +72,4 @@ final class OrderTypeBottomSheetListSelectorCommand: BottomSheetListSelectorComm
7772
func handleSelectedChange(selected: BottomSheetOrderType) {
7873
onSelection(selected)
7974
}
80-
81-
func isSelected(model: BottomSheetOrderType) -> Bool {
82-
return model == selected
83-
}
8475
}

0 commit comments

Comments
 (0)