Supports “custom” pledge amounts for Patreon apps

This commit is contained in:
Riley Testut
2024-02-16 14:21:06 -06:00
committed by Magesh K
parent ac62612a18
commit 2f603778d6
4 changed files with 47 additions and 13 deletions

View File

@@ -292,7 +292,7 @@ extension AppBannerView
self.button.accessibilityLabel = String(format: NSLocalizedString("Install %@", comment: ""), app.name)
self.button.accessibilityValue = buttonTitle
}
else if let amount = storeApp.pledgeAmount, let currencyCode = storeApp.pledgeCurrency, #available(iOS 15, *)
else if let amount = storeApp.pledgeAmount, let currencyCode = storeApp.pledgeCurrency, !storeApp.prefersCustomPledge, #available(iOS 15, *)
{
let price = amount.formatted(.currency(code: currencyCode).presentation(.narrow).precision(.fractionLength(0...2)))