Skip to content

Commit d883fe5

Browse files
committed
remove remaining iOS17 availability checks
1 parent 8bb8784 commit d883fe5

File tree

4 files changed

+7
-23
lines changed

4 files changed

+7
-23
lines changed

WooCommerce/Classes/POS/TabBar/POSTabCoordinator.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ private extension POSTabCoordinator {
146146
let orderService = POSOrderService(siteID: siteID,
147147
credentials: credentials,
148148
selectedSite: defaultSitePublisher,
149-
appPasswordSupportState: isAppPasswordSupported),
150-
#available(iOS 17.0, *) {
149+
appPasswordSupportState: isAppPasswordSupported) {
151150
let posView = PointOfSaleEntryPointView(
152151
siteID: siteID,
153152
itemFetchStrategyFactory: posItemFetchStrategyFactory,

WooCommerce/Classes/ViewRelated/Orders/Order Details/Address Edit/AddressMapPickerView.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,5 @@ private extension AddressMapPickerView {
162162
}
163163

164164
#Preview {
165-
if #available(iOS 17, *) {
166-
AddressMapPickerView(fields: .constant(.init()), countryByCode: { _ in nil })
167-
} else {
168-
EmptyView()
169-
}
165+
AddressMapPickerView(fields: .constant(.init()), countryByCode: { _ in nil })
170166
}

WooCommerce/Classes/ViewRelated/Orders/Order Details/Address Edit/EditOrderAddressForm.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ struct SingleAddressForm: View {
244244
}
245245
}
246246
.sheet(isPresented: $showMapPicker) {
247-
if #available(iOS 17, *) {
248-
AddressMapPickerView(fields: $fields, countryByCode: countryByCode)
249-
}
247+
AddressMapPickerView(fields: $fields, countryByCode: countryByCode)
250248
}
251249
}
252250

@@ -324,7 +322,7 @@ struct SingleAddressForm: View {
324322
.padding(.horizontal, insets: safeAreaInsets)
325323
.accessibility(addTraits: .isHeader)
326324
VStack(spacing: 0) {
327-
if #available(iOS 17, *), ServiceLocator.featureFlagService.isFeatureFlagEnabled(.orderAddressMapSearch) {
325+
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.orderAddressMapSearch) {
328326
Button(action: {
329327
showMapPicker = true
330328
ServiceLocator.analytics.track(.orderDetailEditAddressMapPickerTapped,

WooCommerce/Classes/ViewRelated/ReusableViews/SwiftUI Components/BadgeView.swift

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,9 @@ private extension BadgeView {
9696
func backgroundView() -> some View {
9797
switch backgroundShape {
9898
case .circle:
99-
if #available(iOS 17, *) {
100-
Circle()
101-
.fill(customizations.backgroundColor)
102-
.stroke(Color.white, lineWidth: Layout.borderLineWidth)
103-
} else {
104-
ZStack {
105-
Circle()
106-
.fill(customizations.backgroundColor)
107-
Circle()
108-
.stroke(Color.white, lineWidth: Layout.borderLineWidth)
109-
}
110-
}
99+
Circle()
100+
.fill(customizations.backgroundColor)
101+
.stroke(Color.white, lineWidth: Layout.borderLineWidth)
111102
case .roundedRectangle(let cornerRadius):
112103
RoundedRectangle(cornerRadius: cornerRadius)
113104
.stroke(.white, lineWidth: Layout.borderLineWidth)

0 commit comments

Comments
 (0)