mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-14 10:36:03 +01:00
Change fix for CloudKit crashing bug in case this was causing syncing problems
This commit is contained in:
parent
da28c79202
commit
38f56f66b4
@ -117,7 +117,8 @@ private extension CloudKitSendStatusOperation {
|
|||||||
articlesZone.modifyArticles(statusUpdates) { result in
|
articlesZone.modifyArticles(statusUpdates) { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .success:
|
case .success:
|
||||||
self.database.deleteSelectedForProcessing(articleIDs) { _ in
|
|
||||||
|
func complete() {
|
||||||
// Don't clear the last one since we might have had additional ticks added
|
// Don't clear the last one since we might have had additional ticks added
|
||||||
if self.showProgress && self.refreshProgress?.numberRemaining ?? 0 > 1 {
|
if self.showProgress && self.refreshProgress?.numberRemaining ?? 0 > 1 {
|
||||||
self.refreshProgress?.completeTask()
|
self.refreshProgress?.completeTask()
|
||||||
@ -125,6 +126,15 @@ private extension CloudKitSendStatusOperation {
|
|||||||
os_log(.debug, log: self.log, "Done sending article status block...")
|
os_log(.debug, log: self.log, "Done sending article status block...")
|
||||||
completion()
|
completion()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if statusUpdates.isEmpty {
|
||||||
|
complete()
|
||||||
|
} else {
|
||||||
|
self.database.deleteSelectedForProcessing(statusUpdates.map({ $0.articleID })) { _ in
|
||||||
|
complete()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
self.database.resetSelectedForProcessing(syncStatuses.map({ $0.articleID })) { _ in
|
self.database.resetSelectedForProcessing(syncStatuses.map({ $0.articleID })) { _ in
|
||||||
self.processAccountError(account, error)
|
self.processAccountError(account, error)
|
||||||
|
Loading…
Reference in New Issue
Block a user