mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-10 17:02:54 +01:00
Merge branch 'ios-release'
This commit is contained in:
commit
2d8cbb8017
@ -149,8 +149,7 @@ class WebViewController: UIViewController {
|
||||
}
|
||||
|
||||
func fullReload() {
|
||||
view.subviews.first?.removeFromSuperview()
|
||||
loadWebView()
|
||||
loadWebView(replaceExistingWebView: true)
|
||||
}
|
||||
|
||||
func showBars() {
|
||||
@ -291,6 +290,12 @@ extension WebViewController: UIContextMenuInteractionDelegate {
|
||||
|
||||
extension WebViewController: WKNavigationDelegate {
|
||||
|
||||
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
|
||||
if view.subviews.count > 1 {
|
||||
view.subviews.last?.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
|
||||
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
|
||||
|
||||
if navigationAction.navigationType == .linkActivated {
|
||||
@ -408,10 +413,10 @@ private struct ImageClickMessage: Codable {
|
||||
|
||||
private extension WebViewController {
|
||||
|
||||
func loadWebView() {
|
||||
func loadWebView(replaceExistingWebView: Bool = false) {
|
||||
guard isViewLoaded else { return }
|
||||
|
||||
if let webView = webView {
|
||||
if !replaceExistingWebView, let webView = webView {
|
||||
self.renderPage(webView)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user