mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Continue renaming webFeed to feed.
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
import Foundation
|
||||
import Account
|
||||
|
||||
struct AddWebFeedDefaultContainer {
|
||||
struct AddFeedDefaultContainer {
|
||||
|
||||
static var defaultContainer: Container? {
|
||||
|
||||
if let accountID = AppDefaults.shared.addWebFeedAccountID, let account = AccountManager.shared.activeAccounts.first(where: { $0.accountID == accountID }) {
|
||||
if let folderName = AppDefaults.shared.addWebFeedFolderName, let folder = account.existingFolder(withDisplayName: folderName) {
|
||||
if let accountID = AppDefaults.shared.addFeedAccountID, let account = AccountManager.shared.activeAccounts.first(where: { $0.accountID == accountID }) {
|
||||
if let folderName = AppDefaults.shared.addFeedFolderName, let folder = account.existingFolder(withDisplayName: folderName) {
|
||||
return folder
|
||||
} else {
|
||||
return substituteContainerIfNeeded(account: account)
|
||||
@@ -28,11 +28,11 @@ struct AddWebFeedDefaultContainer {
|
||||
}
|
||||
|
||||
static func saveDefaultContainer(_ container: Container) {
|
||||
AppDefaults.shared.addWebFeedAccountID = container.account?.accountID
|
||||
AppDefaults.shared.addFeedAccountID = container.account?.accountID
|
||||
if let folder = container as? Folder {
|
||||
AppDefaults.shared.addWebFeedFolderName = folder.nameForDisplay
|
||||
AppDefaults.shared.addFeedFolderName = folder.nameForDisplay
|
||||
} else {
|
||||
AppDefaults.shared.addWebFeedFolderName = nil
|
||||
AppDefaults.shared.addFeedFolderName = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ private func accountAndArticlesDictionary(_ articles: Set<Article>) -> [String:
|
||||
|
||||
extension Article {
|
||||
|
||||
var webFeed: Feed? {
|
||||
var feed: Feed? {
|
||||
return account?.existingWebFeed(withWebFeedID: webFeedID)
|
||||
}
|
||||
|
||||
@@ -139,7 +139,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 ""
|
||||
}
|
||||
|
||||
@@ -147,7 +147,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 ""
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ extension Article {
|
||||
extension Article: SortableArticle {
|
||||
|
||||
var sortableName: String {
|
||||
return webFeed?.name ?? ""
|
||||
return feed?.name ?? ""
|
||||
}
|
||||
|
||||
var sortableDate: Date {
|
||||
|
||||
Reference in New Issue
Block a user