diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index e4d39f99ee..d9f651fc28 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -10853,7 +10853,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 194.0.0; + version = 194.1.0; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 55a375cacb..c5522d379b 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "026acbd36fb80c95e0bfc6a9080e369dd85db66f", - "version" : "194.0.0" + "revision" : "09b4901eeab71625c4796c0819d0066278b7b6d6", + "version" : "194.1.0" } }, { diff --git a/DuckDuckGo/AutofillLoginListViewModel.swift b/DuckDuckGo/AutofillLoginListViewModel.swift index 5c2ff7a615..0bf99e6fe1 100644 --- a/DuckDuckGo/AutofillLoginListViewModel.swift +++ b/DuckDuckGo/AutofillLoginListViewModel.swift @@ -229,7 +229,7 @@ final class AutofillLoginListViewModel: ObservableObject { authenticator.logOut() } - func authenticate(completion: @escaping(AutofillLoginListAuthenticator.AuthError?) -> Void) { + func authenticate(completion: @escaping (AutofillLoginListAuthenticator.AuthError?) -> Void) { guard !isAuthenticating else { return } diff --git a/DuckDuckGo/DuckPlayer/DuckPlayerLaunchExperiment.swift b/DuckDuckGo/DuckPlayer/DuckPlayerLaunchExperiment.swift index b809c7d5b9..19decaf548 100644 --- a/DuckDuckGo/DuckPlayer/DuckPlayerLaunchExperiment.swift +++ b/DuckDuckGo/DuckPlayer/DuckPlayerLaunchExperiment.swift @@ -91,6 +91,8 @@ final class DuckPlayerLaunchExperiment: DuckPlayerLaunchExperimentHandling { @UserDefaultsWrapper(key: .duckPlayerPixelExperimentCohort, defaultValue: nil) var experimentCohort: String? + private var isInternalUser: Bool + enum Cohort: String { case control case experiment @@ -100,11 +102,13 @@ final class DuckPlayerLaunchExperiment: DuckPlayerLaunchExperimentHandling { referrer: DuckPlayerReferrer? = nil, userDefaults: UserDefaults = UserDefaults.standard, pixel: DuckPlayerExperimentPixelFiring.Type = Pixel.self, - dateProvider: DuckPlayerExperimentDateProvider = DefaultDuckPlayerExperimentDateProvider()) { + dateProvider: DuckPlayerExperimentDateProvider = DefaultDuckPlayerExperimentDateProvider(), + isInternalUser: Bool = false) { self.referrer = referrer self.duckPlayerMode = duckPlayerMode self.pixel = pixel self.dateProvider = dateProvider + self.isInternalUser = isInternalUser } private var dates: (day: Int, week: Int)? { @@ -140,7 +144,11 @@ final class DuckPlayerLaunchExperiment: DuckPlayerLaunchExperimentHandling { func assignUserToCohort() { if !isEnrolled { - let cohort: Cohort = Bool.random() ? .experiment : .control + var cohort: Cohort = Bool.random() ? .experiment : .control + + if isInternalUser { + cohort = .experiment + } experimentCohort = cohort.rawValue enrollmentDate = dateProvider.currentDate fireEnrollmentPixel() diff --git a/DuckDuckGo/ImportPasswordsViewModel.swift b/DuckDuckGo/ImportPasswordsViewModel.swift index 480eb27ef4..46b0e20cc5 100644 --- a/DuckDuckGo/ImportPasswordsViewModel.swift +++ b/DuckDuckGo/ImportPasswordsViewModel.swift @@ -79,7 +79,7 @@ final class ImportPasswordsViewModel { /// Keeping track on whether or not either button was pressed on this screen /// so that a pixel can be fired if the user navigates away without taking any action - private (set) var buttonWasPressed: Bool = false + private(set) var buttonWasPressed: Bool = false func maxButtonWidth() -> CGFloat { let maxWidth = maxWidthFor(title1: ButtonType.getBrowser.title, title2: ButtonType.sync.title) diff --git a/DuckDuckGo/SpeechRecognizer.swift b/DuckDuckGo/SpeechRecognizer.swift index 67e58d9377..119fbfedb8 100644 --- a/DuckDuckGo/SpeechRecognizer.swift +++ b/DuckDuckGo/SpeechRecognizer.swift @@ -101,7 +101,7 @@ final class SpeechRecognizer: NSObject, SpeechRecognizerProtocol { func startRecording(resultHandler: @escaping (_ text: String?, _ error: Error?, _ speechDidFinish: Bool) -> Void, - volumeCallback: @escaping(_ volume: Float) -> Void) { + volumeCallback: @escaping (_ volume: Float) -> Void) { recognitionRequest = SFSpeechAudioBufferRecognitionRequest() audioEngine = AVAudioEngine() diff --git a/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift b/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift index 0743776c30..12ef1e53ee 100644 --- a/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift +++ b/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift @@ -372,7 +372,7 @@ extension TabViewController { private func shareLinkWithTemporaryDownload(_ temporaryDownload: Download?, originalLink: Link, - completion: @escaping(Link) -> Void) { + completion: @escaping (Link) -> Void) { guard let download = temporaryDownload else { completion(originalLink) return