mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-08 23:35:25 +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()
|
||||
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 a new issue