Use open_url from the platform module

And remove the open function from the `util` crate.
This commit is contained in:
Petros Amoiridis 2023-02-15 15:58:57 +02:00
parent 015b8db1c3
commit 7a667f390b
No known key found for this signature in database
3 changed files with 4 additions and 19 deletions

View file

@ -146,11 +146,8 @@ pub mod simple_message_notification {
pub fn init(cx: &mut MutableAppContext) {
cx.add_action(MessageNotification::dismiss);
cx.add_action(
|_workspace: &mut Workspace, open_action: &OsOpen, _cx: &mut ViewContext<Workspace>| {
#[cfg(target_os = "macos")]
{
util::open(&open_action.0);
}
|_workspace: &mut Workspace, open_action: &OsOpen, cx: &mut ViewContext<Workspace>| {
cx.platform().open_url(open_action.0.as_str());
},
)
}