Better purchase flow
This commit is contained in:
parent
42a43ad659
commit
75cd23df5d
|
@ -82,10 +82,11 @@ struct SupportAppView: View {
|
|||
Spacer()
|
||||
Button {
|
||||
isProcessingPurchase = true
|
||||
Purchases.shared.purchase(product: product) { _, _, _, success in
|
||||
if success {
|
||||
Task {
|
||||
do {
|
||||
_ = try await Purchases.shared.purchase(product: product)
|
||||
purchaseSuccessDisplayed = true
|
||||
} else {
|
||||
} catch {
|
||||
purchaseErrorDisplayed = true
|
||||
}
|
||||
isProcessingPurchase = false
|
||||
|
|
Loading…
Reference in New Issue