mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 08:17:16 +00:00
Continue post-DatabaseResult simplification.
This commit is contained in:
1 parent
fcaa1cc03c
commit
1066ca2720
25 files changed
+215
-259
No files matched your search
@@ -193,7 +193,7 @@ import Articles
|
||||
|
||||
@objc(articles)
|
||||
var articles: NSArray {
|
||||
let feedArticles = (try? feed.fetchArticles()) ?? Set<Article>()
|
||||
let feedArticles = feed.fetchArticles()
|
||||
// the articles are a set, use the sorting algorithm from the viewer
|
||||
let sortedArticles = feedArticles.sorted(by: {
|
||||
return $0.logicalDatePublished > $1.logicalDatePublished
|
||||
@@ -203,7 +203,7 @@ import Articles
|
||||
|
||||
@objc(valueInArticlesWithUniqueID:)
|
||||
func valueInArticles(withUniqueID id: String) -> ScriptableArticle? {
|
||||
let articles = (try? feed.fetchArticles()) ?? Set<Article>()
|
||||
let articles = feed.fetchArticles()
|
||||
guard let article = articles.first(where: {$0.uniqueID == id}) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user