1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-10 17:08:39 +00:00

Update TouchBarController.swift

This commit is contained in:
Daniel Apatin 2018-04-20 15:21:30 +03:00 committed by GitHub
parent 2aecb2ffb3
commit e6d84888ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,6 +222,14 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
task.arguments = parameters
task.launch()
}
case .openUrl(url: let url):
return {
if let url = URL(string: url), NSWorkspace.shared.open(url) {
// print("URL was successfully opened")
} else {
print("error", url)
}
}
case .custom(closure: let closure):
return closure
case .none: