Change event used to stop web view activity (video and image zooming) so that it doesn't interfere with the image zooming transition.

This commit is contained in:
Maurice Parker
2020-02-18 11:08:38 -08:00
parent e3b32847f9
commit 8acd6a039a
2 changed files with 10 additions and 8 deletions

View File

@@ -92,14 +92,6 @@ class WebViewController: UIViewController {
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
if let webView = webView {
stopMediaPlayback(webView)
cancelImageLoad(webView)
}
}
// MARK: Notifications
@objc func webFeedIconDidBecomeAvailable(_ note: Notification) {
@@ -216,6 +208,13 @@ class WebViewController: UIViewController {
stopArticleExtractor()
}
}
func stopWebViewActivity() {
if let webView = webView {
stopMediaPlayback(webView)
cancelImageLoad(webView)
}
}
func showActivityDialog(popOverBarButtonItem: UIBarButtonItem? = nil) {
guard let preferredLink = article?.preferredLink, let url = URL(string: preferredLink) else {