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