From acae24d65badd0278c07a74f9b8a2e5c54bf8e10 Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Tue, 30 Apr 2024 15:34:57 +0200 Subject: [PATCH] Enable field validation for sync payloads --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- .../Preferences/Model/SyncPreferences.swift | 20 +++++++++---------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 975b9f1315..9ad5e58c36 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -12737,8 +12737,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { - kind = exactVersion; - version = 142.0.0; + branch = "dominik/sync-enable-field-validation"; + kind = branch; }; }; 9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 72e9ff06b4..de400f931f 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" : "2681b5271a4e0582f175771737617adb8a4d6e78", - "version" : "142.0.0" + "branch" : "dominik/sync-enable-field-validation", + "revision" : "b117aa5db149dcb6c1b2b7a76a42c2f39e095ef3" } }, { diff --git a/DuckDuckGo/Preferences/Model/SyncPreferences.swift b/DuckDuckGo/Preferences/Model/SyncPreferences.swift index a0a5591360..7781247f6c 100644 --- a/DuckDuckGo/Preferences/Model/SyncPreferences.swift +++ b/DuckDuckGo/Preferences/Model/SyncPreferences.swift @@ -172,17 +172,15 @@ final class SyncPreferences: ObservableObject, SyncUI.ManagementViewModel { } .store(in: &cancellables) - if DDGSync.isFieldValidationEnabled { - syncService.isSyncInProgressPublisher - .removeDuplicates() - .filter { !$0 } - .asVoid() - .receive(on: DispatchQueue.main) - .sink { [weak self] in - self?.updateInvalidObjects() - } - .store(in: &cancellables) - } + syncService.isSyncInProgressPublisher + .removeDuplicates() + .filter { !$0 } + .asVoid() + .receive(on: DispatchQueue.main) + .sink { [weak self] in + self?.updateInvalidObjects() + } + .store(in: &cancellables) $syncErrorMessage .map { $0 != nil }