Simplify eligibility checks

This commit is contained in:
Davide De Rosa 2019-12-22 12:07:48 +01:00
parent eeb85f89b1
commit 688c9feda7
1 changed files with 2 additions and 8 deletions

View File

@ -167,17 +167,11 @@ class ProductManager: NSObject {
}
func isEligible(forFeature feature: Product) -> Bool {
guard !isFullVersion() else {
return true
}
return purchasedFeatures.contains(feature)
return isFullVersion() || purchasedFeatures.contains(feature)
}
func isEligible(forProvider metadata: Infrastructure.Metadata) -> Bool {
guard !isFullVersion() else {
return true
}
return purchasedFeatures.contains(metadata.product)
return isFullVersion() || purchasedFeatures.contains(metadata.product)
}
func isEligibleForFeedback() -> Bool {