فهرست منبع

Show restore purchase for non-premium users.

Expose Restore Purchase in paywall footer even when Premium is locked.

Co-authored-by: Cursor <cursoragent@cursor.com>
huzaifahayat12 2 ماه پیش
والد
کامیت
3535e4929d
1فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 13 1
      google_apps/PremiumFeaturesView.swift

+ 13 - 1
google_apps/PremiumFeaturesView.swift

@@ -379,7 +379,14 @@ struct PremiumFeaturesView: View {
                     .disabled(premiumStore.restoreInProgress || premiumStore.purchaseInProgress)
                 }
             } else {
-                continueWithFreeButton
+                HStack {
+                    continueWithFreeButton
+                    Spacer()
+                    footerActionButton(premiumStore.restoreInProgress ? "Restoring…" : "Restore Purchase") {
+                        Task { await premiumStore.restorePurchases() }
+                    }
+                    .disabled(premiumStore.restoreInProgress || premiumStore.purchaseInProgress)
+                }
             }
 
             HStack {
@@ -414,6 +421,11 @@ struct PremiumFeaturesView: View {
                 } else {
                     footerActionButton("Continue with Free") { dismissPremiumUI() }
                     Spacer(minLength: 18)
+                    footerActionButton(premiumStore.restoreInProgress ? "Restoring…" : "Restore Purchase") {
+                        Task { await premiumStore.restorePurchases() }
+                    }
+                    .disabled(premiumStore.restoreInProgress || premiumStore.purchaseInProgress)
+                    Spacer(minLength: 18)
                 }
                 footerActionButton("Privacy Policy") { openExternalPage(ExternalPage.privacy) }
                 Spacer(minLength: 18)