mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-20 21:40:43 +01:00
Remove batch update blocks that were causing more harm than good.
This commit is contained in:
parent
39aecd84fe
commit
b3cf7ccdb7
@ -59,7 +59,6 @@ final class CloudKitAccountDelegate: AccountDelegate {
|
||||
|
||||
func receiveRemoteNotification(for account: Account, userInfo: [AnyHashable : Any], completion: @escaping () -> Void) {
|
||||
let group = DispatchGroup()
|
||||
BatchUpdate.shared.start()
|
||||
|
||||
zones.forEach { zone in
|
||||
group.enter()
|
||||
@ -69,7 +68,6 @@ final class CloudKitAccountDelegate: AccountDelegate {
|
||||
}
|
||||
|
||||
group.notify(queue: DispatchQueue.main) {
|
||||
BatchUpdate.shared.end()
|
||||
completion()
|
||||
}
|
||||
}
|
||||
@ -77,9 +75,10 @@ final class CloudKitAccountDelegate: AccountDelegate {
|
||||
func refreshAll(for account: Account, completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
BatchUpdate.shared.start()
|
||||
accountZone.fetchChangesInZone() { result in
|
||||
BatchUpdate.shared.end()
|
||||
switch result {
|
||||
case .success:
|
||||
|
||||
|
||||
self.sendArticleStatus(for: account) { result in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -89,7 +88,6 @@ final class CloudKitAccountDelegate: AccountDelegate {
|
||||
case .success:
|
||||
|
||||
self.refresher.refreshFeeds(account.flattenedWebFeeds()) {
|
||||
BatchUpdate.shared.end()
|
||||
account.metadata.lastArticleFetchEndTime = Date()
|
||||
completion(.success(()))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user