From b3b1dab522fd61242ded3ccbf334001203f1c88d Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 27 Apr 2020 01:04:38 -0500 Subject: [PATCH] Restore unread and starred articles to iCloud on webbed restore. --- .../Account/CloudKit/CloudKitAccountDelegate.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift index cbd4eab29..289af594f 100644 --- a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift +++ b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift @@ -305,7 +305,16 @@ final class CloudKitAccountDelegate: AccountDelegate { case .success(let externalID): feed.externalID = externalID container.addWebFeed(feed) - completion(.success(())) + + account.fetchArticlesAsync(.webFeed(feed)) { result in + switch result { + case .success(let articles): + self.articlesZone.saveNewArticles(articles, completion: completion) + case .failure(let error): + completion(.failure(error)) + } + } + case .failure(let error): self.processAccountError(account, error) completion(.failure(error))