Skip to content

Commit

Permalink
Merge tag '211.1.3-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
miasma13 committed Dec 4, 2024
2 parents befc1f1 + a150770 commit 0448a76
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Sources/Subscription/SubscriptionFeatureMappingCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ public protocol SubscriptionFeatureMappingCache {
func subscriptionFeatures(for subscriptionIdentifier: String) async -> [Entitlement.ProductName]
}

public final class DefaultSubscriptionFeatureMappingCache: SubscriptionFeatureMappingCache {
public actor DefaultSubscriptionFeatureMappingCache: SubscriptionFeatureMappingCache {

private let subscriptionEndpointService: SubscriptionEndpointService
private let userDefaults: UserDefaults

private var subscriptionFeatureMapping: SubscriptionFeatureMapping?

public init(subscriptionEndpointService: SubscriptionEndpointService, userDefaults: UserDefaults) {
self.subscriptionEndpointService = subscriptionEndpointService
self.userDefaults = userDefaults
Expand Down Expand Up @@ -96,7 +94,7 @@ public final class DefaultSubscriptionFeatureMappingCache: SubscriptionFeatureMa

static private let subscriptionFeatureMappingKey = "com.duckduckgo.subscription.featuremapping"

dynamic var storedFeatureMapping: SubscriptionFeatureMapping? {
var storedFeatureMapping: SubscriptionFeatureMapping? {
get {
guard let data = userDefaults.data(forKey: Self.subscriptionFeatureMappingKey) else { return nil }
do {
Expand Down

0 comments on commit 0448a76

Please sign in to comment.