Fix bug that prevented first article from being selected on iPad.

This commit is contained in:
Maurice Parker 2019-12-31 17:06:13 -07:00
parent af76e44c0f
commit f0a5309786
1 changed files with 5 additions and 4 deletions

View File

@ -61,7 +61,7 @@ class WebViewController: UIViewController {
if article?.webFeed?.isArticleExtractorAlwaysOn ?? false { if article?.webFeed?.isArticleExtractorAlwaysOn ?? false {
startArticleExtractor() startArticleExtractor()
} }
if oldValue != nil && article != oldValue { if article != oldValue {
reloadHTML() reloadHTML()
} }
} }
@ -124,6 +124,7 @@ class WebViewController: UIViewController {
} }
func reloadHTML() { func reloadHTML() {
guard let webView = webView else { return }
let style = ArticleStylesManager.shared.currentStyle let style = ArticleStylesManager.shared.currentStyle
let rendering: ArticleRenderer.Rendering let rendering: ArticleRenderer.Rendering
@ -154,8 +155,8 @@ class WebViewController: UIViewController {
restoreOffset = 0 restoreOffset = 0
WebViewProvider.shared.articleIconSchemeHandler.currentArticle = article WebViewProvider.shared.articleIconSchemeHandler.currentArticle = article
webView?.scrollView.setZoomScale(1.0, animated: false) webView.scrollView.setZoomScale(1.0, animated: false)
webView?.evaluateJavaScript(render) webView.evaluateJavaScript(render)
} }