Seeds Harmony database on launch if not yet seeded
This commit is contained in:
parent
d446e3612f
commit
4bbfee5e8f
@ -61,7 +61,17 @@ extension LaunchViewController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [isDatabaseManagerStarted, isSyncingManagerStarted]
|
let isRecordControllerSeeded = RSTLaunchCondition(condition: { SyncManager.shared.syncCoordinator.recordController.isSeeded }) { (completionHandler) in
|
||||||
|
SyncManager.shared.syncCoordinator.recordController.seedFromPersistentContainer() { (result) in
|
||||||
|
switch result
|
||||||
|
{
|
||||||
|
case .success: completionHandler(nil)
|
||||||
|
case .failure(let error): completionHandler(error.error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return [isDatabaseManagerStarted, isSyncingManagerStarted, isRecordControllerSeeded]
|
||||||
}
|
}
|
||||||
|
|
||||||
override func handleLaunchError(_ error: Error)
|
override func handleLaunchError(_ error: Error)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user