[Delta Sync] Delays seeding Harmony database until initial sync

This commit is contained in:
Riley Testut 2023-07-07 18:19:07 -05:00
parent f184639c6b
commit 5779927831
3 changed files with 2149 additions and 2169 deletions

View File

@ -209,31 +209,7 @@ extension SyncManager
{
guard let coordinator = self.coordinator else { return completionHandler(.failure(AuthenticationError(Error.nilService))) }
coordinator.authenticate(presentingViewController: presentingViewController) { (result) in
do
{
let account = try result.get()
if !coordinator.recordController.isSeeded
{
coordinator.recordController.seedFromPersistentContainer { (result) in
switch result
{
case .success: completionHandler(.success(account))
case .failure(let error): completionHandler(.failure(AuthenticationError(error)))
}
}
}
else
{
completionHandler(.success(account))
}
}
catch
{
completionHandler(.failure(AuthenticationError(error)))
}
}
coordinator.authenticate(presentingViewController: presentingViewController, completionHandler: completionHandler)
}
func deauthenticate(completionHandler: @escaping (Result<Void, DeauthenticationError>) -> Void)

2
External/Harmony vendored

@ -1 +1 @@
Subproject commit 8e1f605e54e090ce94c4ff90d9d2cb52b5f11fb1
Subproject commit 7de86c48353bb900757ac289f3108b84a5ed8357

File diff suppressed because it is too large Load Diff