mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Adds app default option
Adds app defaults option for controlling link opening preferences. Adds browser logic and images. Browser Manager Updates - Handles deletion of current browser - Fixes detection of installed browsers by moving URL Types to LSApplicationQuery - Updates icons to glyphs - Context menus update tidy up - removes browser specific options and offers in-app or default browser options (can be enabled via a bool) - adds 1Password as an option - removes custom wording on context menus Fixes - makes sure browser options are available on iPad - uses VibrantCell - Changes Settings title to "Open Links In"
This commit is contained in:
@@ -250,8 +250,12 @@ class WebViewController: UIViewController {
|
||||
|
||||
func openInAppBrowser() {
|
||||
guard let url = article?.preferredURL else { return }
|
||||
let vc = SFSafariViewController(url: url)
|
||||
present(vc, animated: true)
|
||||
if BrowserManager.shared.currentBrowser() == .inApp {
|
||||
let vc = SFSafariViewController(url: url)
|
||||
present(vc, animated: true)
|
||||
} else {
|
||||
BrowserManager.shared.openURL(urlString: url.absoluteString)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +348,12 @@ extension WebViewController: WKNavigationDelegate {
|
||||
let components = URLComponents(url: url, resolvingAgainstBaseURL: false)
|
||||
if components?.scheme == "http" || components?.scheme == "https" {
|
||||
decisionHandler(.cancel)
|
||||
openURL(url)
|
||||
if BrowserManager.shared.currentBrowser() == .inApp {
|
||||
openURL(url)
|
||||
} else {
|
||||
BrowserManager.shared.openURL(urlString: url.absoluteString)
|
||||
}
|
||||
|
||||
} else if components?.scheme == "mailto" {
|
||||
decisionHandler(.cancel)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user