mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Add batch update block to fetch to prevent the Feeds list from dancing around.
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user