Skip to content

Commit

Permalink
Do not refresh cookie on config update (#3593)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1201037661562251/1208835217248246/f

**Description**:
Do not refresh cookie on config update

**Steps to test this PR**:
Fix for crash when `subscriptionCookieManager` accessed WebKit datastore
not on the main thread when the privacy config had update with enabled
`setAccessTokenCookieForSubscriptionDomains` feature flag.
  • Loading branch information
miasma13 authored Nov 25, 2024
1 parent 55246c9 commit 4a3dae4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DuckDuckGo/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate {

let isEnabled = privacyConfigurationManager.privacyConfig.isSubfeatureEnabled(PrivacyProSubfeature.setAccessTokenCookieForSubscriptionDomains)

Task { [weak self] in
Task { @MainActor [weak self] in
if isEnabled {
self?.subscriptionCookieManager.enableSettingSubscriptionCookie()
await self?.subscriptionCookieManager.refreshSubscriptionCookie()
} else {
await self?.subscriptionCookieManager.disableSettingSubscriptionCookie()
}
Expand Down

0 comments on commit 4a3dae4

Please sign in to comment.