Always open the project panel for dev server projects (#12654)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-06-04 16:07:12 -06:00 committed by GitHub
parent 74cb92f9cc
commit c7d56302d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 51 additions and 29 deletions

View file

@ -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())
})
}
}