Consequences of Guard changes

sync3
Laurent 2 months ago
parent 463a7af43b
commit 2299e941b2
  1. 3
      PadelClub/AppDelegate.swift
  2. 11
      PadelClub/Views/Tournament/Subscription/SubscriptionView.swift

@ -55,9 +55,10 @@ class AppDelegate : NSObject, UIApplicationDelegate, UNUserNotificationCenterDel
StoreCenter.main.forceNoSynchronization = !synchronized
}
func applicationWillEnterForeground(_ application: UIApplication) {
Task {
try await Guard.main.refreshPurchasedAppleProducts()
await Guard.main.refreshPurchases()
}
}

@ -238,14 +238,9 @@ struct SubscriptionView: View {
fileprivate func _restore() {
Task {
do {
self.isRestoring = true
try await Guard.main.refreshPurchasedAppleProducts()
self.isRestoring = false
} catch {
self.isRestoring = false
Logger.error(error)
}
self.isRestoring = true
await Guard.main.refreshPurchases()
self.isRestoring = false
}
}

Loading…
Cancel
Save