ssh: Dismiss file picker when new window is opened (#19600)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
7f64f0454d
commit
1bded42b2a
1 changed files with 79 additions and 78 deletions
|
@ -215,11 +215,10 @@ impl ProjectPicker {
|
||||||
connection.port,
|
connection.port,
|
||||||
&connection.username,
|
&connection.username,
|
||||||
);
|
);
|
||||||
cx.new_view(|cx| {
|
|
||||||
let _path_task = cx
|
let _path_task = cx
|
||||||
.spawn({
|
.spawn({
|
||||||
let workspace = workspace.clone();
|
let workspace = workspace.clone();
|
||||||
move |_, mut cx| async move {
|
move |this, mut cx| async move {
|
||||||
let Ok(Some(paths)) = rx.await else {
|
let Ok(Some(paths)) = rx.await else {
|
||||||
workspace
|
workspace
|
||||||
.update(&mut cx, |workspace, cx| {
|
.update(&mut cx, |workspace, cx| {
|
||||||
|
@ -291,17 +290,19 @@ impl ProjectPicker {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.log_err();
|
.log_err();
|
||||||
|
this.update(&mut cx, |_, cx| {
|
||||||
|
cx.emit(DismissEvent);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
Some(())
|
Some(())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shared();
|
.shared();
|
||||||
|
cx.new_view(|_| Self {
|
||||||
Self {
|
|
||||||
_path_task,
|
_path_task,
|
||||||
picker,
|
picker,
|
||||||
connection_string,
|
connection_string,
|
||||||
nickname,
|
nickname,
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue