Remove web view recycling as this seems to contribute to the blank article problem on iPadOS

This commit is contained in:
Maurice Parker 2020-04-16 16:26:53 -05:00
parent 7064d5d8f5
commit 928e93c074
1 changed files with 0 additions and 21 deletions

View File

@ -62,10 +62,6 @@ class WebViewController: UIViewController {
let scrollPositionQueue = CoalescingQueue(name: "Article Scroll Position", interval: 0.3, maxInterval: 1.0)
var windowScrollY = 0
deinit {
recycleWebView(webView)
}
override func viewDidLoad() {
super.viewDidLoad()
@ -451,23 +447,6 @@ private extension WebViewController {
}
func recycleWebView(_ webView: PreloadedWebView?) {
guard let webView = webView else { return }
webView.removeFromSuperview()
stopMediaPlayback(webView)
cancelImageLoad(webView)
webView.navigationDelegate = nil
webView.uiDelegate = nil
webView.scrollView.delegate = nil
webView.configuration.userContentController.removeScriptMessageHandler(forName: MessageName.imageWasClicked)
webView.configuration.userContentController.removeScriptMessageHandler(forName: MessageName.imageWasShown)
webView.interactions.removeAll()
coordinator.webViewProvider.enqueueWebView(webView)
}
func renderPage(_ webView: PreloadedWebView?) {
guard let webView = webView else { return }