Rename Article.webFeed to Article.feed.

This commit is contained in:
Brent Simmons
2023-07-02 16:22:14 -07:00
parent bb450ababa
commit 75f1eee00c
21 changed files with 47 additions and 51 deletions

View File

@@ -41,10 +41,6 @@ private func accountAndArticlesDictionary(_ articles: Set<Article>) -> [String:
extension Article {
var webFeed: WebFeed? {
return account?.existingWebFeed(withWebFeedID: webFeedID)
}
var url: URL? {
return URL.encodingSpacesIfNeeded(rawLink)
}
@@ -138,7 +134,7 @@ extension Article {
}
func byline() -> String {
guard let authors = authors ?? webFeed?.authors, !authors.isEmpty else {
guard let authors = authors ?? feed?.authors, !authors.isEmpty else {
return ""
}
@@ -146,7 +142,7 @@ extension Article {
// This code assumes that multiple authors would never match the feed name so that
// if there feed owner has an article co-author all authors are given the byline.
if authors.count == 1, let author = authors.first {
if author.name == webFeed?.nameForDisplay {
if author.name == feed?.nameForDisplay {
return ""
}
}
@@ -214,7 +210,7 @@ extension Article {
extension Article: SortableArticle {
var sortableName: String {
return webFeed?.name ?? ""
return feed?.name ?? ""
}
var sortableDate: Date {