mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-06-06 22:08:50 +00:00
Better purchase flow
This commit is contained in:
parent
42a43ad659
commit
75cd23df5d
1 changed files with 4 additions and 3 deletions
|
@ -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 a new issue