Set the container properly for each feed in `selectedArticles`.
This commit is contained in:
parent
531e48a337
commit
a4d867c712
|
@ -42,9 +42,9 @@ extension NSApplication : ScriptingObjectContainer {
|
||||||
func selectedArticles() -> NSArray {
|
func selectedArticles() -> NSArray {
|
||||||
let articles = appDelegate.scriptingSelectedArticles
|
let articles = appDelegate.scriptingSelectedArticles
|
||||||
let scriptableArticles:[ScriptableArticle] = articles.compactMap { article in
|
let scriptableArticles:[ScriptableArticle] = articles.compactMap { article in
|
||||||
if let feed = article.feed {
|
if let feed = article.feed, let account = feed.account {
|
||||||
let scriptableFeed = ScriptableFeed(feed, container:self)
|
let scriptableFeed = ScriptableFeed(feed, container: ScriptableAccount(account))
|
||||||
return ScriptableArticle(article, container:scriptableFeed)
|
return ScriptableArticle(article, container: scriptableFeed)
|
||||||
} else {
|
} else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue