mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
AppleScript: Add a "feed" property to articles
- Also make scripts like feed id "foo" of account id "bar" find feeds in folders.
This commit is contained in:
@@ -101,14 +101,13 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
|
||||
|
||||
@objc(valueInWebFeedsWithUniqueID:)
|
||||
func valueInWebFeeds(withUniqueID id:String) -> ScriptableWebFeed? {
|
||||
let feeds = Array(account.topLevelWebFeeds)
|
||||
guard let feed = feeds.first(where:{$0.webFeedID == id}) else { return nil }
|
||||
guard let feed = account.existingWebFeed(withWebFeedID: id) else { return nil }
|
||||
return ScriptableWebFeed(feed, container:self)
|
||||
}
|
||||
|
||||
@objc(valueInWebFeedsWithName:)
|
||||
func valueInWebFeeds(withName name:String) -> ScriptableWebFeed? {
|
||||
let feeds = Array(account.topLevelWebFeeds)
|
||||
let feeds = Array(account.flattenedWebFeeds())
|
||||
guard let feed = feeds.first(where:{$0.name == name}) else { return nil }
|
||||
return ScriptableWebFeed(feed, container:self)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user