Converts to a browser preference to a Bool.

This commit is contained in:
Stuart Breckenridge
2021-08-26 10:27:23 +08:00
parent 3bc18e2891
commit 178e737040
9 changed files with 50 additions and 276 deletions

View File

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