mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Simplify articles and article variables.
This commit is contained in:
@@ -21,23 +21,16 @@ final class DetailViewController: NSViewController, WKUIDelegate {
|
||||
|
||||
var articles: [Article]? {
|
||||
didSet {
|
||||
if let articles = articles, articles.count == 1 {
|
||||
article = articles.first!
|
||||
if articles == articles {
|
||||
return
|
||||
}
|
||||
statusBarView.mouseoverLink = nil
|
||||
article = nil
|
||||
reloadHTML()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private var article: Article? {
|
||||
didSet {
|
||||
if article != nil, article != oldValue {
|
||||
statusBarView.mouseoverLink = nil
|
||||
reloadHTML()
|
||||
}
|
||||
}
|
||||
return articles?.first
|
||||
}
|
||||
|
||||
private var webviewIsHidden: Bool {
|
||||
|
||||
Reference in New Issue
Block a user