From 9ffaa41d35d4b5031e43034c519eba78cfefa3c1 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 1 Apr 2020 14:55:22 -0500 Subject: [PATCH] Add missing post sync database updates. --- Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift index c769c526b..a40eb3eb3 100644 --- a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift +++ b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift @@ -124,9 +124,11 @@ final class CloudKitAccountDelegate: AccountDelegate { self.articlesZone.sendArticleStatus(syncStatuses) { result in switch result { case .success: + self.database.deleteSelectedForProcessing(syncStatuses.map({ $0.articleID }) ) os_log(.debug, log: self.log, "Done sending article statuses.") completion(.success(())) case .failure(let error): + self.database.resetSelectedForProcessing(syncStatuses.map({ $0.articleID }) ) completion(.failure(error)) } }