Reduces Browsers to in-app and system default

This commit is contained in:
Stuart Breckenridge
2021-08-25 15:05:18 +08:00
parent 7a726e6d8a
commit 3bc18e2891
31 changed files with 39 additions and 427 deletions

View File

@@ -900,7 +900,7 @@ private extension MasterTimelineViewController {
func openInBrowserAlertAction(_ article: Article, completion: @escaping (Bool) -> Void) -> UIAlertAction? {
guard let _ = article.preferredURL else { return nil }
var displayName: String
BrowserManager.shared.currentBrowser() == .inApp ? (displayName = Browser.safari.displayName) : (displayName = BrowserManager.shared.currentBrowser().displayName)
AppDefaults.shared.browserPreference == Browser.inApp.displayName ? (displayName = Browser.inApp.displayName) : (displayName = Browser.defaultBrowser.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)