mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Make sure we have only one web view in the view hierarchy after navigation. Issue #2075
This commit is contained in:
@@ -60,7 +60,7 @@ class WebViewController: UIViewController {
|
||||
|
||||
private(set) var article: Article?
|
||||
|
||||
let scrollPositionQueue = CoalescingQueue(name: "Article Scroll Position", interval: 0.3, maxInterval: 1.0)
|
||||
let scrollPositionQueue = CoalescingQueue(name: "Article Scroll Position", interval: 0.3, maxInterval: 0.3)
|
||||
var windowScrollY = 0
|
||||
|
||||
override func viewDidLoad() {
|
||||
@@ -291,7 +291,7 @@ extension WebViewController: UIContextMenuInteractionDelegate {
|
||||
extension WebViewController: WKNavigationDelegate {
|
||||
|
||||
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
|
||||
if view.subviews.count > 1 {
|
||||
while view.subviews.count > 1 {
|
||||
view.subviews.last?.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user