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:
Stuart Breckenridge
2021-08-22 09:42:06 +08:00
parent 656782ff9e
commit 08a1120e00
33 changed files with 803 additions and 80 deletions

View File

@@ -899,7 +899,9 @@ private extension MasterTimelineViewController {
func openInBrowserAlertAction(_ article: Article, completion: @escaping (Bool) -> Void) -> UIAlertAction? {
guard let _ = article.preferredURL else { return nil }
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
var displayName: String
BrowserManager.shared.currentBrowser() == .inApp ? (displayName = Browser.safari.displayName) : (displayName = BrowserManager.shared.currentBrowser().displayName)
let title = NSLocalizedString("Open in \(displayName)", comment: "Open in Browser")
let action = UIAlertAction(title: title, style: .default) { [weak self] action in
self?.coordinator.showBrowserForArticle(article)
completion(true)