From 2efa939f254147787ad5d0cec9187a509696daba Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 26 Apr 2020 11:37:12 -0500 Subject: [PATCH] Do a combined refresh on the initial refresh to get read article content. --- .../Account/CloudKit/CloudKitAccountDelegate.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift index 3f714497b..070fd05b7 100644 --- a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift +++ b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift @@ -488,14 +488,21 @@ private extension CloudKitAccountDelegate { accountZone.fetchChangesInZone() { result in self.refreshProgress.completeTask() + let webFeeds = account.flattenedWebFeeds() + self.refreshProgress.addToNumberOfTasksAndRemaining(webFeeds.count) + switch result { case .success: self.refreshArticleStatus(for: account) { result in self.refreshProgress.completeTask() switch result { case .success: - account.metadata.lastArticleFetchEndTime = Date() - completion(.success(())) + + self.combinedRefresh(account, webFeeds) { + self.refreshProgress.clear() + account.metadata.lastArticleFetchEndTime = Date() + } + case .failure(let error): fail(error) }