Default to open in browser for macOS
This commit is contained in:
parent
09c09d5ea9
commit
4fd0dddf98
|
@ -23,7 +23,7 @@ private struct SafariRouter: ViewModifier {
|
|||
})
|
||||
.onAppear {
|
||||
routerPath.urlHandler = { url in
|
||||
guard preferences.preferredBrowser == .inAppSafari else { return .systemAction }
|
||||
guard preferences.preferredBrowser == .inAppSafari, !ProcessInfo.processInfo.isiOSAppOnMac else { return .systemAction }
|
||||
// SFSafariViewController only supports initial URLs with http:// or https:// schemes.
|
||||
guard let scheme = url.scheme, ["https", "http"].contains(scheme.lowercased()) else {
|
||||
return .systemAction
|
||||
|
|
|
@ -91,17 +91,19 @@ struct SettingsTabs: View {
|
|||
NavigationLink(destination: remoteLocalTimelinesView) {
|
||||
Label("Remote Local Timelines", systemImage: "dot.radiowaves.right")
|
||||
}
|
||||
Picker(selection: $preferences.preferredBrowser) {
|
||||
ForEach(PreferredBrowser.allCases, id: \.rawValue) { browser in
|
||||
switch browser {
|
||||
case .inAppSafari:
|
||||
Text("In-App Safari").tag(browser)
|
||||
case .safari:
|
||||
Text("System Safari").tag(browser)
|
||||
if !ProcessInfo.processInfo.isiOSAppOnMac {
|
||||
Picker(selection: $preferences.preferredBrowser) {
|
||||
ForEach(PreferredBrowser.allCases, id: \.rawValue) { browser in
|
||||
switch browser {
|
||||
case .inAppSafari:
|
||||
Text("In-App Safari").tag(browser)
|
||||
case .safari:
|
||||
Text("System Safari").tag(browser)
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Label("Browser", systemImage: "network")
|
||||
}
|
||||
} label: {
|
||||
Label("Browser", systemImage: "network")
|
||||
}
|
||||
}
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
|
|
Loading…
Reference in New Issue