Merge branch 'mac-candidate'

This commit is contained in:
Brent Simmons 2019-08-12 09:43:48 -07:00
commit 2027e83504
1 changed files with 7 additions and 2 deletions

View File

@ -33,11 +33,16 @@ extension Feed: ArticleFetcher {
}
public func fetchUnreadArticles() -> Set<Article> {
preconditionFailure("feed.fetchUnreadArticles is unused.")
return fetchArticles().unreadArticles()
}
public func fetchUnreadArticlesAsync(_ callback: @escaping ArticleSetBlock) {
preconditionFailure("feed.fetchUnreadArticlesAsync is unused.")
guard let account = account else {
assertionFailure("Expected feed.account, but got nil.")
callback(Set<Article>())
return
}
account.fetchArticlesAsync(.feed(self)) { callback($0.unreadArticles()) }
}
}