Skip to content

Commit

Permalink
Merge release/1.111.0 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daxmobile authored Oct 25, 2024
2 parents 9758708 + d99fd1a commit 584398f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 288
CURRENT_PROJECT_VERSION = 289
2 changes: 1 addition & 1 deletion DuckDuckGo/Onboarding/OnboardingUserScript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class OnboardingUserScript: NSObject, Subfeature {
let onboardingActionsManager: OnboardingActionsManaging
var messageOriginPolicy: MessageOriginPolicy = .only(rules: [.exact(hostname: "onboarding")])
let featureName: String = "onboarding"
var broker: UserScriptMessageBroker?
weak var broker: UserScriptMessageBroker?

// MARK: - MessageNames
enum MessageNames: String, CaseIterable {
Expand Down
14 changes: 11 additions & 3 deletions DuckDuckGoVPN/DuckDuckGoVPNAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,7 @@ final class DuckDuckGoVPNAppDelegate: NSObject, NSApplicationDelegate {

configurationSubscription = privacyConfigurationManager.updatesPublisher
.sink { [weak self] in
if self?.privacyConfigurationManager.privacyConfig.isSubfeatureEnabled(BackgroundAgentPixelTestSubfeature.pixelTest) ?? false {
PixelKit.fire(NetworkProtectionPixelEvent.networkProtectionConfigurationPixelTest, frequency: .daily)
}
self?.firePrivacyConfigTestPixelIfNecessary()
}

if launchedOnStartup {
Expand Down Expand Up @@ -428,6 +426,9 @@ final class DuckDuckGoVPNAppDelegate: NSObject, NSApplicationDelegate {

private func setUpSubscriptionMonitoring() {
guard accountManager.isUserAuthenticated else { return }

self.firePrivacyConfigTestPixelIfNecessary()

let entitlementsCheck = {
await self.accountManager.hasEntitlement(forProductName: .networkProtection, cachePolicy: .reloadIgnoringLocalCacheData)
}
Expand All @@ -454,6 +455,13 @@ final class DuckDuckGoVPNAppDelegate: NSObject, NSApplicationDelegate {
}
}
}

private func firePrivacyConfigTestPixelIfNecessary() {
if privacyConfigurationManager.privacyConfig.isSubfeatureEnabled(BackgroundAgentPixelTestSubfeature.pixelTest) {
PixelKit.fire(NetworkProtectionPixelEvent.networkProtectionConfigurationPixelTest, frequency: .daily)
}
}

}

extension DuckDuckGoVPNAppDelegate: AccountManagerKeychainAccessDelegate {
Expand Down

0 comments on commit 584398f

Please sign in to comment.