Fetch zone changes immediately after making them to keep us better in sync
This commit is contained in:
parent
4f54a21084
commit
e4f0a87a64
|
@ -632,8 +632,10 @@ private extension CloudKitAccountDelegate {
|
||||||
self.articlesZone.deleteArticles(deletedArticles) { _ in
|
self.articlesZone.deleteArticles(deletedArticles) { _ in
|
||||||
self.refreshProgress.completeTask()
|
self.refreshProgress.completeTask()
|
||||||
self.articlesZone.saveNewArticles(newAndUpdatedArticles) { _ in
|
self.articlesZone.saveNewArticles(newAndUpdatedArticles) { _ in
|
||||||
self.refreshProgress.completeTask()
|
self.articlesZone.fetchChangesInZone() { _ in
|
||||||
completion()
|
self.refreshProgress.completeTask()
|
||||||
|
completion()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -684,8 +686,10 @@ private extension CloudKitAccountDelegate {
|
||||||
self.articlesZone.deleteArticles(deletedArticles) { _ in
|
self.articlesZone.deleteArticles(deletedArticles) { _ in
|
||||||
self.refreshProgress.completeTask()
|
self.refreshProgress.completeTask()
|
||||||
self.articlesZone.saveNewArticles(newAndUpdatedArticles) { _ in
|
self.articlesZone.saveNewArticles(newAndUpdatedArticles) { _ in
|
||||||
self.refreshProgress.clear()
|
self.articlesZone.fetchChangesInZone() { _ in
|
||||||
completion(.success(feed))
|
self.refreshProgress.clear()
|
||||||
|
completion(.success(feed))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -765,8 +769,10 @@ private extension CloudKitAccountDelegate {
|
||||||
self.articlesZone.deleteArticles(deletedArticles) { _ in
|
self.articlesZone.deleteArticles(deletedArticles) { _ in
|
||||||
self.refreshProgress.completeTask()
|
self.refreshProgress.completeTask()
|
||||||
self.articlesZone.saveNewArticles(newAndUpdatedArticles) { _ in
|
self.articlesZone.saveNewArticles(newAndUpdatedArticles) { _ in
|
||||||
self.refreshProgress.clear()
|
self.articlesZone.fetchChangesInZone() { _ in
|
||||||
completion(.success(feed))
|
self.refreshProgress.clear()
|
||||||
|
completion(.success(feed))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,8 +222,10 @@ private extension CloudKitAcountZoneDelegate {
|
||||||
self.articlesZone?.deleteArticles(deletedArticles) { _ in
|
self.articlesZone?.deleteArticles(deletedArticles) { _ in
|
||||||
self.refreshProgress?.completeTask()
|
self.refreshProgress?.completeTask()
|
||||||
self.articlesZone?.saveNewArticles(newAndUpdatedArticles) { _ in
|
self.articlesZone?.saveNewArticles(newAndUpdatedArticles) { _ in
|
||||||
self.refreshProgress?.completeTask()
|
self.articlesZone?.fetchChangesInZone() { _ in
|
||||||
completion(webFeed)
|
self.refreshProgress?.completeTask()
|
||||||
|
completion(webFeed)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,8 +267,10 @@ private extension CloudKitAcountZoneDelegate {
|
||||||
self.articlesZone?.deleteArticles(deletedArticles) { _ in
|
self.articlesZone?.deleteArticles(deletedArticles) { _ in
|
||||||
self.refreshProgress?.completeTask()
|
self.refreshProgress?.completeTask()
|
||||||
self.articlesZone?.saveNewArticles(newAndUpdatedArticles) { _ in
|
self.articlesZone?.saveNewArticles(newAndUpdatedArticles) { _ in
|
||||||
self.refreshProgress?.completeTask()
|
self.articlesZone?.fetchChangesInZone() { _ in
|
||||||
completion(webFeed)
|
self.refreshProgress?.completeTask()
|
||||||
|
completion(webFeed)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case .failure:
|
case .failure:
|
||||||
|
|
Loading…
Reference in New Issue