diff --git a/crates/recent_projects/src/remote_servers.rs b/crates/recent_projects/src/remote_servers.rs index faf58f312fafa7d7038c3b7c807c0a88ee0d14c6..a7ffee5e573c7429038471910629615c31dc7920 100644 --- a/crates/recent_projects/src/remote_servers.rs +++ b/crates/recent_projects/src/remote_servers.rs @@ -738,7 +738,8 @@ impl RemoteServerProjects { }; let project = project.clone(); let server = server.clone(); - cx.spawn(|remote_server_projects, mut cx| async move { + cx.emit(DismissEvent); + cx.spawn(|_, mut cx| async move { let result = open_ssh_project( server.into(), project.paths.into_iter().map(PathBuf::from).collect(), @@ -757,10 +758,6 @@ impl RemoteServerProjects { ) .await .ok(); - } else { - remote_server_projects - .update(&mut cx, |_, cx| cx.emit(DismissEvent)) - .ok(); } }) .detach();