diff --git a/Passepartout/App/iOS/Scenes/Purchase/PurchaseViewController.swift b/Passepartout/App/iOS/Scenes/Purchase/PurchaseViewController.swift index dd6a822c..1073af79 100644 --- a/Passepartout/App/iOS/Scenes/Purchase/PurchaseViewController.swift +++ b/Passepartout/App/iOS/Scenes/Purchase/PurchaseViewController.swift @@ -70,7 +70,7 @@ class PurchaseViewController: UITableViewController, StrongTableHost { rows.append(.restore) model.set(rows, forSection: .products) - let featureBulletsList: [String] = ProductManager.shared.featureProducts(includingFullVersion: false).map { + let featureBulletsList: [String] = ProductManager.shared.featureProducts(excluding: [.fullVersion, .fullVersion_iOS]).map { return "- \($0.localizedTitle)" }.sortedCaseInsensitive() let featureBullets = featureBulletsList.joined(separator: "\n") diff --git a/Passepartout/Core/Sources/Model/ProductManager.swift b/Passepartout/Core/Sources/Model/ProductManager.swift index 601d54a6..c166efa5 100644 --- a/Passepartout/Core/Sources/Model/ProductManager.swift +++ b/Passepartout/Core/Sources/Model/ProductManager.swift @@ -118,12 +118,12 @@ public class ProductManager: NSObject { return inApp.product(withIdentifier: identifier) } - public func featureProducts(includingFullVersion: Bool) -> [SKProduct] { + public func featureProducts(excluding: [Product]) -> [SKProduct] { return inApp.products.filter { guard let p = Product(rawValue: $0.productIdentifier) else { return false } - guard includingFullVersion || p != .fullVersion else { + guard !excluding.contains(p) else { return false } guard p.isFeature else {