Skip to content

Commit

Permalink
Enable field validation for sync payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Apr 30, 2024
1 parent e0f5c47 commit acae24d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down
20 changes: 9 additions & 11 deletions DuckDuckGo/Preferences/Model/SyncPreferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit acae24d

Please sign in to comment.