mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-27 11:07:08 +00:00
fix(ui): explicitly route about:debugging to firefox to prevent LaunchServices error
This commit is contained in:
@@ -727,8 +727,24 @@ private struct IntegrationSettingsPane: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func openFirefoxDebugging() {
|
private func openFirefoxDebugging() {
|
||||||
if let url = URL(string: "about:debugging#/runtime/this-firefox") {
|
guard let url = URL(string: "about:debugging#/runtime/this-firefox") else { return }
|
||||||
NSWorkspace.shared.open(url)
|
|
||||||
|
let bundleIDs = [
|
||||||
|
"org.mozilla.firefoxdeveloperedition",
|
||||||
|
"org.mozilla.firefox",
|
||||||
|
"org.mozilla.nightly"
|
||||||
|
]
|
||||||
|
|
||||||
|
let workspace = NSWorkspace.shared
|
||||||
|
for id in bundleIDs {
|
||||||
|
if let appURL = workspace.urlForApplication(withBundleIdentifier: id) {
|
||||||
|
let config = NSWorkspace.OpenConfiguration()
|
||||||
|
workspace.open([url], withApplicationAt: appURL, configuration: config, completionHandler: nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fallback
|
||||||
|
workspace.open(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user