diff --git a/Packages/App/Sources/UILibrary/Views/About/DonateView.swift b/Packages/App/Sources/UILibrary/Views/About/DonateView.swift index cc16bd42..c136ff04 100644 --- a/Packages/App/Sources/UILibrary/Views/About/DonateView.swift +++ b/Packages/App/Sources/UILibrary/Views/About/DonateView.swift @@ -85,6 +85,7 @@ private extension DonateView { iapManager: iapManager, style: .donation, product: $0, + withIncludedFeatures: false, purchasingIdentifier: $purchasingIdentifier, onComplete: onComplete, onError: onError diff --git a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallProductView.swift b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallProductView.swift index a3ecd513..978efc59 100644 --- a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallProductView.swift +++ b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallProductView.swift @@ -36,6 +36,8 @@ public struct PaywallProductView: View { private let product: InAppProduct + private let withIncludedFeatures: Bool + private let highlightedFeatures: Set @Binding @@ -52,6 +54,7 @@ public struct PaywallProductView: View { iapManager: IAPManager, style: PaywallProductViewStyle, product: InAppProduct, + withIncludedFeatures: Bool = true, highlightedFeatures: Set = [], purchasingIdentifier: Binding, onComplete: @escaping (String, InAppPurchaseResult) -> Void, @@ -60,6 +63,7 @@ public struct PaywallProductView: View { self.iapManager = iapManager self.style = style self.product = product + self.withIncludedFeatures = withIncludedFeatures self.highlightedFeatures = highlightedFeatures _purchasingIdentifier = purchasingIdentifier self.onComplete = onComplete @@ -69,13 +73,9 @@ public struct PaywallProductView: View { public var body: some View { VStack(alignment: .leading) { productView - Group { - includedFeaturesButton - .padding(.top, 8) - includedFeaturesList - .if(isPresentingFeatures) + if withIncludedFeatures { + includedFeaturesView } - .font(.subheadline) } } } @@ -104,6 +104,16 @@ private extension PaywallProductView { } } + var includedFeaturesView: some View { + Group { + includedFeaturesButton + .padding(.top, 8) + includedFeaturesList + .if(isPresentingFeatures) + } + .font(.subheadline) + } + var includedFeaturesButton: some View { Button { isPresentingFeatures.toggle()