Add batch update block to fetch to prevent the Feeds list from dancing around.
This commit is contained in:
parent
1be5dc8a54
commit
31e06cd24a
|
@ -69,14 +69,17 @@ final class CloudKitAccountDelegate: AccountDelegate {
|
|||
}
|
||||
|
||||
func refreshAll(for account: Account, completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
BatchUpdate.shared.start()
|
||||
accountZone.fetchChangesInZone() { result in
|
||||
switch result {
|
||||
case .success:
|
||||
self.refresher.refreshFeeds(account.flattenedWebFeeds()) {
|
||||
BatchUpdate.shared.end()
|
||||
account.metadata.lastArticleFetchEndTime = Date()
|
||||
completion(.success(()))
|
||||
}
|
||||
case .failure(let error):
|
||||
BatchUpdate.shared.end()
|
||||
completion(.failure(error))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue