recent_projects: Fix remote projects not regaining focus after SSH server connect (#31651)
Closes #28071 Release Notes: - Fixed issue preventing remote projects modal from regaining focus after a successful SSH server connection.
This commit is contained in:
parent
87f097a0ab
commit
5173a1a968
1 changed files with 3 additions and 2 deletions
|
@ -474,14 +474,15 @@ impl RemoteServerProjects {
|
||||||
.prompt_err("Failed to connect", window, cx, |_, _, _| None);
|
.prompt_err("Failed to connect", window, cx, |_, _, _| None);
|
||||||
|
|
||||||
let address_editor = editor.clone();
|
let address_editor = editor.clone();
|
||||||
let creating = cx.spawn(async move |this, cx| {
|
let creating = cx.spawn_in(window, async move |this, cx| {
|
||||||
match connection.await {
|
match connection.await {
|
||||||
Some(Some(client)) => this
|
Some(Some(client)) => this
|
||||||
.update(cx, |this, cx| {
|
.update_in(cx, |this, window, cx| {
|
||||||
telemetry::event!("SSH Server Created");
|
telemetry::event!("SSH Server Created");
|
||||||
this.retained_connections.push(client);
|
this.retained_connections.push(client);
|
||||||
this.add_ssh_server(connection_options, cx);
|
this.add_ssh_server(connection_options, cx);
|
||||||
this.mode = Mode::default_mode(cx);
|
this.mode = Mode::default_mode(cx);
|
||||||
|
this.focus_handle(cx).focus(window);
|
||||||
cx.notify()
|
cx.notify()
|
||||||
})
|
})
|
||||||
.log_err(),
|
.log_err(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue