mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Change detail to open in SFSafariViewController. Issue #611
This commit is contained in:
@@ -10,6 +10,7 @@ import UIKit
|
||||
import WebKit
|
||||
import Account
|
||||
import Articles
|
||||
import SafariServices
|
||||
|
||||
class DetailViewController: UIViewController {
|
||||
|
||||
@@ -142,7 +143,8 @@ extension DetailViewController: WKNavigationDelegate {
|
||||
|
||||
let components = URLComponents(url: url, resolvingAgainstBaseURL: false)
|
||||
if components?.scheme == "http" || components?.scheme == "https" {
|
||||
UIApplication.shared.open(url)
|
||||
let vc = SFSafariViewController(url: url)
|
||||
present(vc, animated: true)
|
||||
decisionHandler(.cancel)
|
||||
} else {
|
||||
decisionHandler(.allow)
|
||||
|
||||
Reference in New Issue
Block a user