From bfc0be45ae9aef689b37f2920a91a09757978bdc Mon Sep 17 00:00:00 2001 From: Davide Date: Thu, 7 Nov 2024 23:10:26 +0100 Subject: [PATCH] Hide donation link in beta --- .../Library/Sources/AppUIMain/Views/About/AboutView.swift | 4 ++++ .../Sources/AppUIMain/Views/About/iOS/AboutView+iOS.swift | 4 +++- .../Sources/AppUIMain/Views/About/macOS/AboutView+macOS.swift | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Passepartout/Library/Sources/AppUIMain/Views/About/AboutView.swift b/Passepartout/Library/Sources/AppUIMain/Views/About/AboutView.swift index 47d5ef0c..1c23ccee 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/About/AboutView.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/About/AboutView.swift @@ -29,6 +29,10 @@ import PassepartoutKit import SwiftUI struct AboutView: View { + + @EnvironmentObject + var iapManager: IAPManager + let profileManager: ProfileManager @Binding diff --git a/Passepartout/Library/Sources/AppUIMain/Views/About/iOS/AboutView+iOS.swift b/Passepartout/Library/Sources/AppUIMain/Views/About/iOS/AboutView+iOS.swift index 96e249dd..f5db61a3 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/About/iOS/AboutView+iOS.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/About/iOS/AboutView+iOS.swift @@ -35,7 +35,9 @@ extension AboutView { Group { linksLink creditsLink - donateLink + if !iapManager.isRestricted { + donateLink + } } .themeSection(header: Strings.Views.About.Sections.resources) Section { diff --git a/Passepartout/Library/Sources/AppUIMain/Views/About/macOS/AboutView+macOS.swift b/Passepartout/Library/Sources/AppUIMain/Views/About/macOS/AboutView+macOS.swift index c085c27f..25d83afa 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/About/macOS/AboutView+macOS.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/About/macOS/AboutView+macOS.swift @@ -34,7 +34,9 @@ extension AboutView { Section { linksLink creditsLink - donateLink + if !iapManager.isRestricted { + donateLink + } diagnosticsLink } }