File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
WooCommerce/Classes/POS/TabBar Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ struct POSIneligibleView: View {
5757 Text ( Localization . refreshEligibility)
5858 }
5959 . buttonStyle ( POSFilledButtonStyle ( size: . normal, isLoading: isLoading) )
60+ . renderedIf ( reason. shouldShowRetryButton)
6061
6162 Button {
6263 dismiss ( )
@@ -143,6 +144,23 @@ private extension POSIneligibleView {
143144 }
144145}
145146
147+ @available ( iOS 17 . 0 , * )
148+ private extension POSIneligibleReason {
149+ var shouldShowRetryButton : Bool {
150+ switch self {
151+ case . unsupportedIOSVersion:
152+ return false
153+ case . unsupportedWooCommerceVersion,
154+ . siteSettingsNotAvailable,
155+ . wooCommercePluginNotFound,
156+ . featureSwitchDisabled,
157+ . unsupportedCurrency,
158+ . selfDeallocated:
159+ return true
160+ }
161+ }
162+ }
163+
146164#if DEBUG
147165
148166#Preview( " Unsupported currency " ) {
You can’t perform that action at this time.
0 commit comments