ssh: Fix file picker not getting focus when it's opened for the first time (#19546)
Release Notes: - N/A Co-authored-by: Danilo <danilo@zed.dev>
This commit is contained in:
parent
a367c6de6e
commit
bc9086c9af
1 changed files with 12 additions and 2 deletions
|
@ -182,6 +182,12 @@ impl SelectableItemList {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl FocusableView for ProjectPicker {
|
||||||
|
fn focus_handle(&self, cx: &AppContext) -> FocusHandle {
|
||||||
|
self.picker.focus_handle(cx)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl ProjectPicker {
|
impl ProjectPicker {
|
||||||
fn new(
|
fn new(
|
||||||
ix: usize,
|
ix: usize,
|
||||||
|
@ -379,6 +385,7 @@ impl RemoteServerProjects {
|
||||||
workspace,
|
workspace,
|
||||||
cx,
|
cx,
|
||||||
));
|
));
|
||||||
|
cx.notify();
|
||||||
|
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
@ -1226,8 +1233,11 @@ fn get_text(element: &View<Editor>, cx: &mut WindowContext) -> String {
|
||||||
impl ModalView for RemoteServerProjects {}
|
impl ModalView for RemoteServerProjects {}
|
||||||
|
|
||||||
impl FocusableView for RemoteServerProjects {
|
impl FocusableView for RemoteServerProjects {
|
||||||
fn focus_handle(&self, _cx: &AppContext) -> FocusHandle {
|
fn focus_handle(&self, cx: &AppContext) -> FocusHandle {
|
||||||
self.focus_handle.clone()
|
match &self.mode {
|
||||||
|
Mode::ProjectPicker(picker) => picker.focus_handle(cx),
|
||||||
|
_ => self.focus_handle.clone(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue