From 11a0f95cdd0d0a65f959d53e9e8d252cd8abc1e5 Mon Sep 17 00:00:00 2001 From: Davide Date: Mon, 28 Oct 2024 20:08:13 +0100 Subject: [PATCH] Wrap paywall into NavigationStack --- .../Sources/AppUI/Views/Paywall/PaywallModifier.swift | 6 ++++-- .../Sources/AppUI/Views/Paywall/PaywallView.swift | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Passepartout/Library/Sources/AppUI/Views/Paywall/PaywallModifier.swift b/Passepartout/Library/Sources/AppUI/Views/Paywall/PaywallModifier.swift index 443ca526..70ff7bda 100644 --- a/Passepartout/Library/Sources/AppUI/Views/Paywall/PaywallModifier.swift +++ b/Passepartout/Library/Sources/AppUI/Views/Paywall/PaywallModifier.swift @@ -51,8 +51,10 @@ struct PaywallModifier: ViewModifier { Text(Strings.Alerts.Iap.Restricted.message) } ) - .themeModal(item: $paywallFeature) { - PaywallView(isPresented: isPresentingPurchase, feature: $0) + .themeModal(item: $paywallFeature) { feature in + NavigationStack { + PaywallView(isPresented: isPresentingPurchase, feature: feature) + } } .onChange(of: reason) { switch $0 { diff --git a/Passepartout/Library/Sources/AppUI/Views/Paywall/PaywallView.swift b/Passepartout/Library/Sources/AppUI/Views/Paywall/PaywallView.swift index 83828826..4394612c 100644 --- a/Passepartout/Library/Sources/AppUI/Views/Paywall/PaywallView.swift +++ b/Passepartout/Library/Sources/AppUI/Views/Paywall/PaywallView.swift @@ -37,9 +37,13 @@ struct PaywallView: View { // FIXME: #585, implement payments var body: some View { - Text(String(describing: feature)) - .toolbar(content: toolbarContent) - .navigationTitle(Strings.Global.purchase) + VStack { + Spacer() + Text(String(describing: feature).capitalized) + Spacer() + } + .toolbar(content: toolbarContent) + .navigationTitle(Strings.Global.purchase) } }