Преглед изворни кода

Remove stale weekly plan handling from StoreKit paywall flow.

Drop weekly plan kind and P1W mappings so premium logic stays aligned with monthly, yearly, and lifetime offerings.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hussain Afzal пре 2 недеља
родитељ
комит
7f324eb710

+ 2 - 2
smart_printer/Managers/StoreManager.swift

@@ -50,7 +50,7 @@ final class StoreManager {
     var premiumAccessKind: PremiumAccessKind {
         switch activePremiumPlan?.kind {
         case .lifetime: .lifetime
-        case .weekly, .monthly, .yearly: .subscription
+        case .monthly, .yearly: .subscription
         case nil: .none
         }
     }
@@ -593,7 +593,7 @@ final class StoreManager {
         let kind: PremiumAccessKind
         switch plan?.kind {
         case .lifetime: kind = .lifetime
-        case .weekly, .monthly, .yearly: kind = .subscription
+        case .monthly, .yearly: kind = .subscription
         case nil: kind = .none
         }
 

+ 0 - 3
smart_printer/Services/StoreKitCatalog.swift

@@ -2,7 +2,6 @@ import Foundation
 import StoreKit
 
 enum PaywallPlanKind: String, CaseIterable, Sendable {
-    case weekly
     case monthly
     case yearly
     case lifetime
@@ -174,7 +173,6 @@ struct StoreKitCatalogSnapshot: Sendable {
             return .lifetime
         }
         switch subscriptionPeriod {
-        case "P1W": return .weekly
         case "P1M": return .monthly
         case "P1Y": return .yearly
         default: return .monthly
@@ -183,7 +181,6 @@ struct StoreKitCatalogSnapshot: Sendable {
 
     private static func sortOrder(for subscriptionPeriod: String?) -> Int {
         switch subscriptionPeriod {
-        case "P1W": return 10
         case "P1M": return 20
         case "P1Y": return 30
         default: return 40