Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

remote servers: Always dismiss modal (#19831)

Thorsten Ball67eb652bf1c0
diff --git a/crates/recent_projects/src/remote_servers.rs b/crates/recent_projects/src/remote_servers.rs
index faf58f312fa..a7ffee5e573 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();