From 79c25da04a94b79a434af31a9bec1e23b92f1ccd Mon Sep 17 00:00:00 2001 From: Scott Clampet Date: Thu, 15 Aug 2024 11:10:44 -0700 Subject: [PATCH 1/2] show shimmer view while shipping dropdown is loading --- Library/RemoteConfig/RemoteConfigFeature+Helpers.swift | 2 +- Library/ViewModels/PledgeShippingLocationViewModel.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/RemoteConfig/RemoteConfigFeature+Helpers.swift b/Library/RemoteConfig/RemoteConfigFeature+Helpers.swift index fc45fe38c1..a31b2f5750 100644 --- a/Library/RemoteConfig/RemoteConfigFeature+Helpers.swift +++ b/Library/RemoteConfig/RemoteConfigFeature+Helpers.swift @@ -18,7 +18,7 @@ public func featureDarkModeEnabled() -> Bool { } public func featureNoShippingAtCheckout() -> Bool { - return featureEnabled(feature: .noShippingAtCheckout) + true } public func featurePostCampaignPledgeEnabled() -> Bool { diff --git a/Library/ViewModels/PledgeShippingLocationViewModel.swift b/Library/ViewModels/PledgeShippingLocationViewModel.swift index 86feb93e71..65c6b84981 100644 --- a/Library/ViewModels/PledgeShippingLocationViewModel.swift +++ b/Library/ViewModels/PledgeShippingLocationViewModel.swift @@ -54,7 +54,7 @@ public final class PledgeShippingLocationViewModel: PledgeShippingLocationViewMo .map { $0.3 } let shippingShouldBeginLoading = reward - .map { $0.shipping.enabled } + .map { featureNoShippingAtCheckout() ? true : $0.shipping.enabled } let shippingRulesEvent = Signal.zip(project, reward) .filter { _, reward in featureNoShippingAtCheckout() ? true : reward.shipping.enabled } From 64537ae9cde688802cd9a08db34aa0d3e27d544d Mon Sep 17 00:00:00 2001 From: Scott Clampet Date: Thu, 15 Aug 2024 11:12:28 -0700 Subject: [PATCH 2/2] oops --- Library/RemoteConfig/RemoteConfigFeature+Helpers.swift | 2 +- Library/ViewModels/PledgeShippingLocationViewModel.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/RemoteConfig/RemoteConfigFeature+Helpers.swift b/Library/RemoteConfig/RemoteConfigFeature+Helpers.swift index a31b2f5750..fc45fe38c1 100644 --- a/Library/RemoteConfig/RemoteConfigFeature+Helpers.swift +++ b/Library/RemoteConfig/RemoteConfigFeature+Helpers.swift @@ -18,7 +18,7 @@ public func featureDarkModeEnabled() -> Bool { } public func featureNoShippingAtCheckout() -> Bool { - true + return featureEnabled(feature: .noShippingAtCheckout) } public func featurePostCampaignPledgeEnabled() -> Bool { diff --git a/Library/ViewModels/PledgeShippingLocationViewModel.swift b/Library/ViewModels/PledgeShippingLocationViewModel.swift index 65c6b84981..ebaafa3829 100644 --- a/Library/ViewModels/PledgeShippingLocationViewModel.swift +++ b/Library/ViewModels/PledgeShippingLocationViewModel.swift @@ -54,7 +54,7 @@ public final class PledgeShippingLocationViewModel: PledgeShippingLocationViewMo .map { $0.3 } let shippingShouldBeginLoading = reward - .map { featureNoShippingAtCheckout() ? true : $0.shipping.enabled } + .map { featureNoShippingAtCheckout() ? true : $0.shipping.enabled } let shippingRulesEvent = Signal.zip(project, reward) .filter { _, reward in featureNoShippingAtCheckout() ? true : reward.shipping.enabled }