|
|
|
|
@ -48,7 +48,7 @@ import Combine |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@objc func collectionDidLoad(notification: Notification) { |
|
|
|
|
if let _ = notification.object as? StoredCollection<Purchase> { |
|
|
|
|
if let _ = notification.object as? BaseCollection<Purchase> { |
|
|
|
|
self._updateBestPlan() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -189,6 +189,11 @@ import Combine |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public var currentPlan: StoreItem? { |
|
|
|
|
if let currentBestPurchase = self.currentBestPurchase, let plan = StoreItem(rawValue: currentBestPurchase.productId) { |
|
|
|
|
return plan |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if DEBUG |
|
|
|
|
if let plan = PListReader.readString(plist: "local", key: "plan"), !plan.isEmpty { |
|
|
|
|
return StoreItem(rawValue: plan) |
|
|
|
|
|