Rename WebFeed type to just Feed.

This commit is contained in:
Brent Simmons
2023-07-05 10:02:53 -07:00
parent d5d57a7e30
commit 2f07f4ee16
50 changed files with 393 additions and 393 deletions

View File

@@ -73,10 +73,10 @@ extension NSApplication : ScriptingObjectContainer {
for 'articles of feed "The Shape of Everything" of account "On My Mac"'
*/
func allWebFeeds() -> [WebFeed] {
func allWebFeeds() -> [Feed] {
let accounts = AccountManager.shared.activeAccounts
let emptyFeeds:[WebFeed] = []
return accounts.reduce(emptyFeeds) { (result, nthAccount) -> [WebFeed] in
let emptyFeeds:[Feed] = []
return accounts.reduce(emptyFeeds) { (result, nthAccount) -> [Feed] in
let accountFeeds = Array(nthAccount.topLevelFeeds)
return result + accountFeeds
}
@@ -91,7 +91,7 @@ extension NSApplication : ScriptingObjectContainer {
@objc(valueInWebFeedsWithUniqueID:)
func valueInWebFeeds(withUniqueID id:String) -> ScriptableFeed? {
let webFeeds = self.allWebFeeds()
guard let webFeed = webFeeds.first(where:{$0.webFeedID == id}) else { return nil }
guard let webFeed = webFeeds.first(where:{$0.feedID == id}) else { return nil }
return ScriptableFeed(webFeed, container:self)
}
}