Skip to content

Commit 4ae1b3c

Browse files
committed
Update PointOfSaleEntryPointView.swift
1 parent 9c6c91e commit 4ae1b3c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

WooCommerce/Classes/POS/Presentation/PointOfSaleEntryPointView.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ struct PointOfSaleEntryPointView: View {
2323
private let searchHistoryService: POSSearchHistoryProviding
2424
private let popularPurchasableItemsController: PointOfSaleItemsControllerProtocol
2525
private let barcodeScanService: PointOfSaleBarcodeScanServiceProtocol
26+
private let siteTimezone: TimeZone
2627

2728
init(itemsController: PointOfSaleItemsControllerProtocol,
2829
purchasableItemsSearchController: PointOfSaleSearchingItemsControllerProtocol,
@@ -38,7 +39,8 @@ struct PointOfSaleEntryPointView: View {
3839
searchHistoryService: POSSearchHistoryProviding,
3940
popularPurchasableItemsController: PointOfSaleItemsControllerProtocol,
4041
barcodeScanService: PointOfSaleBarcodeScanServiceProtocol,
41-
posEligibilityChecker: POSEntryPointEligibilityCheckerProtocol) {
42+
posEligibilityChecker: POSEntryPointEligibilityCheckerProtocol,
43+
siteTimezone: TimeZone = .current) {
4244
self.onPointOfSaleModeActiveStateChange = onPointOfSaleModeActiveStateChange
4345

4446
self.itemsController = itemsController
@@ -54,6 +56,7 @@ struct PointOfSaleEntryPointView: View {
5456
self.barcodeScanService = barcodeScanService
5557
self.posEntryPointController = POSEntryPointController(eligibilityChecker: posEligibilityChecker)
5658
self.orderListModel = PointOfSaleOrderListModel(ordersController: ordersController, receiptSender: receiptSender)
59+
self.siteTimezone = siteTimezone
5760
}
5861

5962
var body: some View {
@@ -87,6 +90,7 @@ struct PointOfSaleEntryPointView: View {
8790
.environmentObject(posSheetManager)
8891
.environmentObject(posCoverManager)
8992
.environment(orderListModel)
93+
.environment(\.siteTimezone, siteTimezone)
9094
.injectKeyboardObserver()
9195
.onAppear {
9296
onPointOfSaleModeActiveStateChange(true)

WooCommerce/Classes/POS/TabBar/POSTabCoordinator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ private extension POSTabCoordinator {
148148
itemFetchStrategyFactory: posPopularItemFetchStrategyFactory
149149
),
150150
barcodeScanService: barcodeScanService,
151-
posEligibilityChecker: eligibilityChecker
151+
posEligibilityChecker: eligibilityChecker,
152+
siteTimezone: siteTimezone
152153
)
153-
.environment(\.siteTimezone, siteTimezone)
154154

155155
let hostingController = UIHostingController(rootView: posView)
156156
hostingController.modalPresentationStyle = .fullScreen

0 commit comments

Comments
 (0)