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