Add fetchUnreadArticles method to Account, which will be used by the All Unread smart feed.
This commit is contained in:
parent
9ac2d7d033
commit
00cf3934e5
|
@ -341,9 +341,19 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
|||
return articles
|
||||
}
|
||||
|
||||
public func fetchUnreadArticles() -> Set<Article> {
|
||||
|
||||
return fetchUnreadArticles(forContainer: self)
|
||||
}
|
||||
|
||||
public func fetchArticles(folder: Folder) -> Set<Article> {
|
||||
|
||||
let feeds = folder.flattenedFeeds()
|
||||
return fetchUnreadArticles(forContainer: folder)
|
||||
}
|
||||
|
||||
public func fetchUnreadArticles(forContainer container: Container) -> Set<Article> {
|
||||
|
||||
let feeds = container.flattenedFeeds()
|
||||
let articles = database.fetchUnreadArticles(for: feeds)
|
||||
feeds.forEach { validateUnreadCount($0, articles) }
|
||||
return articles
|
||||
|
|
Loading…
Reference in New Issue