mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Replace the contents property with allFeeds — which returns all the feeds, including those inside folders. This is distinct from the feeds element, which returns just top-level feeds.
This commit is contained in:
@@ -121,18 +121,21 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
|
||||
|
||||
// MARK: --- Scriptable properties ---
|
||||
|
||||
@objc(contents)
|
||||
var contents:NSArray {
|
||||
var contentsArray:[AnyObject] = []
|
||||
@objc(allFeeds)
|
||||
var allFeeds: NSArray {
|
||||
var feeds = [ScriptableFeed]()
|
||||
for feed in account.topLevelFeeds {
|
||||
contentsArray.append(ScriptableFeed(feed, container: self))
|
||||
feeds.append(ScriptableFeed(feed, container: self))
|
||||
}
|
||||
if let folders = account.folders {
|
||||
for folder in folders {
|
||||
contentsArray.append(ScriptableFolder(folder, container:self))
|
||||
let scriptableFolder = ScriptableFolder(folder, container: self)
|
||||
for feed in folder.topLevelFeeds {
|
||||
feeds.append(ScriptableFeed(feed, container: scriptableFolder))
|
||||
}
|
||||
}
|
||||
}
|
||||
return contentsArray as NSArray
|
||||
return feeds as NSArray
|
||||
}
|
||||
|
||||
@objc(opmlRepresentation)
|
||||
|
||||
Reference in New Issue
Block a user