File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
WooCommerce/Classes/POS/TabBar Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ struct POSIneligibleView: View {
1414 Spacer ( )
1515
1616 VStack ( alignment: . center, spacing: POSSpacing . none) {
17- Image ( PointOfSaleAssets . exclamationMark. imageName)
18- . resizable ( )
19- . frame ( width: POSErrorAndAlertIconSize . large. dimension,
20- height: POSErrorAndAlertIconSize . large. dimension)
17+ POSErrorXMark ( )
2118
2219 Spacer ( )
2320 . frame ( height: POSSpacing . medium)
@@ -57,6 +54,7 @@ struct POSIneligibleView: View {
5754 Text ( Localization . refreshEligibility)
5855 }
5956 . buttonStyle ( POSFilledButtonStyle ( size: . normal, isLoading: isLoading) )
57+ . renderedIf ( reason. shouldShowRetryButton)
6058
6159 Button {
6260 dismiss ( )
@@ -143,6 +141,23 @@ private extension POSIneligibleView {
143141 }
144142}
145143
144+ @available ( iOS 17 . 0 , * )
145+ private extension POSIneligibleReason {
146+ var shouldShowRetryButton : Bool {
147+ switch self {
148+ case . unsupportedIOSVersion:
149+ return false
150+ case . unsupportedWooCommerceVersion,
151+ . siteSettingsNotAvailable,
152+ . wooCommercePluginNotFound,
153+ . featureSwitchDisabled,
154+ . unsupportedCurrency,
155+ . selfDeallocated:
156+ return true
157+ }
158+ }
159+ }
160+
146161#if DEBUG
147162
148163#Preview( " Unsupported currency " ) {
You can’t perform that action at this time.
0 commit comments