Restore unread and starred articles to iCloud on webbed restore.

This commit is contained in:
Maurice Parker 2020-04-27 01:04:38 -05:00
parent ab69846e41
commit b3b1dab522
1 changed files with 10 additions and 1 deletions

View File

@ -305,7 +305,16 @@ final class CloudKitAccountDelegate: AccountDelegate {
case .success(let externalID): case .success(let externalID):
feed.externalID = externalID feed.externalID = externalID
container.addWebFeed(feed) 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): case .failure(let error):
self.processAccountError(account, error) self.processAccountError(account, error)
completion(.failure(error)) completion(.failure(error))