Skip to content

Commit 5624fb6

Browse files
committed
Remove unused code
1 parent 5601061 commit 5624fb6

File tree

3 files changed

+4
-29
lines changed

3 files changed

+4
-29
lines changed

Modules/Sources/PointOfSale/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupFlowManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class PointOfSaleBarcodeScannerSetupFlowManager {
9393
}
9494

9595
private func handleKeyboardConnected() {
96-
guard case .setupFlow(let scannerType) = currentState, let step = getCurrentSetupStepValue() else { return }
96+
guard case .setupFlow(let scannerType) = currentState else { return }
9797
analytics.track(event: WooAnalyticsEvent.PointOfSale.barcodeScannerSetupScannerConnected(scanner: scannerType))
9898
}
9999
}

Modules/Sources/PointOfSale/Presentation/Item Selector/ItemList.swift

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -215,31 +215,6 @@ private extension ItemListRow {
215215

216216
#if DEBUG
217217
#Preview("Loaded with items") {
218-
let itemList: ItemListState = .loaded(
219-
[
220-
.simpleProduct(
221-
.init(
222-
id: .init(),
223-
name: "Strong latte 16oz",
224-
formattedPrice: "$4.00",
225-
productID: 12,
226-
price: "4.00",
227-
manageStock: false,
228-
stockQuantity: nil,
229-
stockStatusKey: ""
230-
)
231-
),
232-
.variableParentProduct(
233-
.init(
234-
id: .init(),
235-
name: "Variable mocha",
236-
productImageSource: "https://pd.w.org/2024/12/986762d0d4d4cf17.82435881-scaled.jpeg",
237-
productID: 16
238-
)
239-
)
240-
],
241-
hasMoreItems: false
242-
)
243218
ItemList(
244219
itemsController: PointOfSalePreviewItemsController(),
245220
node: .root,

Modules/Sources/PointOfSale/Presentation/ItemListView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ struct ItemListView: View {
147147
@ViewBuilder
148148
private func itemListContent(_ itemListType: ItemListType) -> some View {
149149
switch itemListState(itemListType) {
150-
case .loading(let items),
151-
.loaded(let items, _),
152-
.inlineError(let items, _, _):
150+
case .loading,
151+
.loaded,
152+
.inlineError:
153153
listView(itemListType: itemListType)
154154
case .error(let errorState):
155155
errorView(errorState)

0 commit comments

Comments
 (0)