Always open the project panel for dev server projects (#12654)
Release Notes: - N/A
This commit is contained in:
parent
74cb92f9cc
commit
c7d56302d2
4 changed files with 51 additions and 29 deletions
|
@ -2377,11 +2377,13 @@ impl Panel for ProjectPanel {
|
|||
}
|
||||
|
||||
fn starts_open(&self, cx: &WindowContext) -> bool {
|
||||
self.project.read(cx).visible_worktrees(cx).any(|tree| {
|
||||
tree.read(cx)
|
||||
.root_entry()
|
||||
.map_or(false, |entry| entry.is_dir())
|
||||
})
|
||||
let project = &self.project.read(cx);
|
||||
project.dev_server_project_id().is_some()
|
||||
|| project.visible_worktrees(cx).any(|tree| {
|
||||
tree.read(cx)
|
||||
.root_entry()
|
||||
.map_or(false, |entry| entry.is_dir())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue