mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 09:31:54 +03:00
remoting: Prevent user from creating multiple dev servers accidentally (#11425)
Fixes #11389 Release Notes: - N/A
This commit is contained in:
parent
c68b700312
commit
283d424485
@ -192,8 +192,9 @@ impl DevServerProjects {
|
||||
cx.spawn(|this, mut cx| async move {
|
||||
let result = dev_server.await;
|
||||
|
||||
this.update(&mut cx, |this, _| match &result {
|
||||
this.update(&mut cx, |this, cx| match &result {
|
||||
Ok(dev_server) => {
|
||||
this.focus_handle.focus(cx);
|
||||
this.mode = Mode::CreateDevServer(CreateDevServer {
|
||||
creating: false,
|
||||
dev_server: Some(dev_server.clone()),
|
||||
@ -299,8 +300,10 @@ impl DevServerProjects {
|
||||
Mode::Default(Some(create_project)) => {
|
||||
self.create_dev_server_project(create_project.dev_server_id, cx);
|
||||
}
|
||||
Mode::CreateDevServer(_) => {
|
||||
self.create_dev_server(cx);
|
||||
Mode::CreateDevServer(state) => {
|
||||
if !state.creating && state.dev_server.is_none() {
|
||||
self.create_dev_server(cx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user