Skip to content

Commit

Permalink
Fix internal user toggling (#2282)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/414235014887631/1206217864822184/f
Tech Design URL:
CC:

Description:

Fixes internal user toggling.
  • Loading branch information
bwaresiak authored Dec 21, 2023
1 parent c17809f commit 1891874
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@
9830A06325ED0DB900DB64DE /* BrowsingMenu.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9830A06225ED0DB900DB64DE /* BrowsingMenu.xcassets */; };
9833913727AC400800DAF119 /* AppTrackerDataSetProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9833913627AC400800DAF119 /* AppTrackerDataSetProvider.swift */; };
9838059F2228208E00385F1A /* PositiveFeedbackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9838059E2228208E00385F1A /* PositiveFeedbackViewController.swift */; };
983BD6B52B34760600AAC78E /* MockPrivacyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */; };
983D71B12A286E810072E26D /* SyncDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 983D71B02A286E810072E26D /* SyncDebugViewController.swift */; };
983EABB8236198F6003948D1 /* DatabaseMigration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 983EABB7236198F6003948D1 /* DatabaseMigration.swift */; };
984147A824F0259000362052 /* Onboarding.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 984147AA24F0259000362052 /* Onboarding.storyboard */; };
Expand Down Expand Up @@ -719,7 +720,6 @@
C18ED43A2AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */; };
C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; };
C1963863283794A000298D4D /* BookmarksCachingSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1963862283794A000298D4D /* BookmarksCachingSearch.swift */; };
C1B0F6422AB08BE9001EAF05 /* MockPrivacyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */; };
C1B7B51C28941E980098FD6A /* HomeMessageViewModelBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */; };
C1B7B52328941F2A0098FD6A /* RemoteMessagingStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51F28941F2A0098FD6A /* RemoteMessagingStore.swift */; };
C1B7B52428941F2A0098FD6A /* RemoteMessageRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B52028941F2A0098FD6A /* RemoteMessageRequest.swift */; };
Expand Down Expand Up @@ -6623,7 +6623,6 @@
C1B7B52428941F2A0098FD6A /* RemoteMessageRequest.swift in Sources */,
EE9D68DA2AE1659F00B55EF4 /* NetworkProtectionVPNNotificationsViewModel.swift in Sources */,
1E8AD1D727C2E24E00ABA377 /* DownloadsListRowViewModel.swift in Sources */,
C1B0F6422AB08BE9001EAF05 /* MockPrivacyConfiguration.swift in Sources */,
1E865AF0272042DB001C74F3 /* TextSizeSettingsViewController.swift in Sources */,
8524CC9A246DA81700E59D45 /* FullscreenDaxDialogViewController.swift in Sources */,
F17669D71E43401C003D3222 /* MainViewController.swift in Sources */,
Expand Down Expand Up @@ -6705,6 +6704,7 @@
8341D807212D5E8D000514C2 /* HashExtensionTest.swift in Sources */,
C1D21E2F293A599C006E5A05 /* AutofillLoginSessionTests.swift in Sources */,
85D2187924BF6B8B004373D2 /* FaviconSourcesProviderTests.swift in Sources */,
983BD6B52B34760600AAC78E /* MockPrivacyConfiguration.swift in Sources */,
1E8146AD28C8ABF000D1AF63 /* TrackerAnimationLogicTests.swift in Sources */,
C1CDA31E2AFBF811006D1476 /* AutofillNeverPromptWebsitesManagerTests.swift in Sources */,
B6AD9E3A28D456820019CDE9 /* PrivacyConfigurationManagerMock.swift in Sources */,
Expand Down Expand Up @@ -9221,7 +9221,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 97.0.0;
version = 98.0.0;
};
};
C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"revision" : "d671accf1bf7097c4e7f5cd55cd1c6dfa005cf92",
"version" : "97.0.0"
"revision" : "064ed560f19fbfd36eb02decebf944689818ed35",
"version" : "98.0.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/AppDependencyProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class AppDependencyProvider: DependencyProvider {
let appSettings: AppSettings = AppUserDefaults()
let variantManager: VariantManager = DefaultVariantManager()

let internalUserDecider: InternalUserDecider = DefaultInternalUserDecider(store: InternalUserStore())
let internalUserDecider: InternalUserDecider = ContentBlocking.shared.privacyConfigurationManager.internalUserDecider
private lazy var privacyConfig: PrivacyConfiguration = ContentBlocking.shared.privacyConfigurationManager.privacyConfig
lazy var featureFlagger: FeatureFlagger = DefaultFeatureFlagger(internalUserDecider: internalUserDecider, privacyConfig: privacyConfig)

Expand Down
2 changes: 2 additions & 0 deletions DuckDuckGoTests/MockPrivacyConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class MockPrivacyConfiguration: PrivacyConfiguration {

@objc(MockPrivacyConfigurationManager)
class MockPrivacyConfigurationManager: NSObject, PrivacyConfigurationManaging {

var embeddedConfigData: BrowserServicesKit.PrivacyConfigurationManager.ConfigurationData {
fatalError("not implemented")
}
Expand All @@ -71,4 +72,5 @@ class MockPrivacyConfigurationManager: NSObject, PrivacyConfigurationManaging {

var updatesPublisher: AnyPublisher<Void, Never> = Just(()).eraseToAnyPublisher()
var privacyConfig: PrivacyConfiguration = MockPrivacyConfiguration()
var internalUserDecider: InternalUserDecider = DefaultInternalUserDecider()
}
1 change: 1 addition & 0 deletions DuckDuckGoTests/PrivacyConfigurationManagerMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class PrivacyConfigurationManagerMock: PrivacyConfigurationManaging {
}

var privacyConfig: PrivacyConfiguration = PrivacyConfigurationMock()
var internalUserDecider: InternalUserDecider = DefaultInternalUserDecider()

var reloadFired = [(etag: String?, data: Data?)]()
var reloadResult: PrivacyConfigurationManager.ReloadResult = .embedded
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/DuckUI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let package = Package(
targets: ["DuckUI"])
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/SyncUI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let package = Package(
],
dependencies: [
.package(path: "../DuckUI"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"),
.package(url: "https://github.com/duckduckgo/DesignResourcesKit", exact: "2.0.0")
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion LocalPackages/Waitlist/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
targets: ["Waitlist", "WaitlistMocks"])
],
dependencies: [
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "97.0.0"),
.package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "98.0.0"),
.package(url: "https://github.com/duckduckgo/DesignResourcesKit", exact: "2.0.0")
],
targets: [
Expand Down

0 comments on commit 1891874

Please sign in to comment.