diff --git a/Frameworks/Data/Article.swift b/Frameworks/Data/Article.swift index 9e476f0ea..bee38db21 100644 --- a/Frameworks/Data/Article.swift +++ b/Frameworks/Data/Article.swift @@ -75,6 +75,12 @@ public extension Set where Element == Article { return Set(map { $0.articleID }) } + + public func unreadArticles() -> Set
{ + + let articles = self.filter { !$0.status.read } + return Set(articles) + } } public extension Array where Element == Article {