[Delta Sync] Delays seeding Harmony database until initial sync
This commit is contained in:
parent
f184639c6b
commit
5779927831
@ -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
2
External/Harmony
vendored
@ -1 +1 @@
|
||||
Subproject commit 8e1f605e54e090ce94c4ff90d9d2cb52b5f11fb1
|
||||
Subproject commit 7de86c48353bb900757ac289f3108b84a5ed8357
|
||||
4290
Pods/Pods.xcodeproj/project.pbxproj
generated
4290
Pods/Pods.xcodeproj/project.pbxproj
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user