Skip reloading HTML in the detail view when the article is set and it’s the same article that was already set.

This commit is contained in:
Brent Simmons 2019-02-09 12:15:05 -08:00
parent 064ef20c19
commit 1c2759dd2b

View File

@ -31,9 +31,11 @@ final class DetailViewController: NSViewController, WKUIDelegate {
private var article: Article? { private var article: Article? {
didSet { didSet {
if article != nil, article != oldValue {
reloadHTML() reloadHTML()
} }
} }
}
private var webviewIsHidden: Bool { private var webviewIsHidden: Bool {
return containerView.contentView !== webview return containerView.contentView !== webview