mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-24 16:51:19 +01:00
Delete orphaned sync status records.
This commit is contained in:
parent
1096e341d5
commit
f446a7e2ea
@ -130,13 +130,14 @@ private extension CloudKitSendStatusOperation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If this happens, we have somehow gotten into a state where we have new status records
|
// If this happens, we have somehow gotten into a state where we have new status records
|
||||||
// but the articles didn't come back in the fetch. Rather than crashing, we continue processing
|
// but the articles didn't come back in the fetch. We need to clean up those sync records
|
||||||
// and hope that it gets cleared up later.
|
// and continue processing.
|
||||||
guard !statusUpdates.isEmpty else {
|
if statusUpdates.isEmpty {
|
||||||
|
self.database.deleteSelectedForProcessing(articleIDs) { _ in
|
||||||
done(false)
|
done(false)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
articlesZone.modifyArticles(statusUpdates) { result in
|
articlesZone.modifyArticles(statusUpdates) { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .success:
|
case .success:
|
||||||
@ -151,6 +152,7 @@ private extension CloudKitSendStatusOperation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user