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.username,
|
||||
);
|
||||
cx.new_view(|cx| {
|
||||
let _path_task = cx
|
||||
.spawn({
|
||||
let workspace = workspace.clone();
|
||||
move |_, mut cx| async move {
|
||||
move |this, mut cx| async move {
|
||||
let Ok(Some(paths)) = rx.await else {
|
||||
workspace
|
||||
.update(&mut cx, |workspace, cx| {
|
||||
|
@ -291,17 +290,19 @@ impl ProjectPicker {
|
|||
})
|
||||
})
|
||||
.log_err();
|
||||
this.update(&mut cx, |_, cx| {
|
||||
cx.emit(DismissEvent);
|
||||
})
|
||||
.ok();
|
||||
Some(())
|
||||
}
|
||||
})
|
||||
.shared();
|
||||
|
||||
Self {
|
||||
cx.new_view(|_| Self {
|
||||
_path_task,
|
||||
picker,
|
||||
connection_string,
|
||||
nickname,
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue