Introduce an open function

And refactor some of the older code to simplify it

Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is contained in:
Petros Amoiridis 2023-02-10 21:11:54 +02:00
parent a789476c95
commit 5d23aaacc8
No known key found for this signature in database
3 changed files with 12 additions and 36 deletions

View file

@ -121,7 +121,6 @@ impl Workspace {
}
pub mod simple_message_notification {
use std::process::Command;
use gpui::{
actions,
@ -150,10 +149,7 @@ pub mod simple_message_notification {
|_workspace: &mut Workspace, open_action: &OsOpen, _cx: &mut ViewContext<Workspace>| {
#[cfg(target_os = "macos")]
{
let mut command = Command::new("open");
command.arg(open_action.0.clone());
command.spawn().ok();
util::open(&open_action.0);
}
},
)