chore(git_panel): prevent footer and header rendering on no git access

This commit is contained in:
dino
2025-12-03 11:11:40 +00:00
parent 11d9654291
commit d078bc54eb

View File

@@ -3944,6 +3944,10 @@ impl GitPanel {
window: &mut Window,
cx: &mut Context<Self>,
) -> Option<impl IntoElement> {
if matches!(self.git_access, GitAccess::No) {
return None;
}
self.active_repository.as_ref()?;
let (text, action, stage, tooltip) =
@@ -4032,6 +4036,9 @@ impl GitPanel {
window: &mut Window,
cx: &mut Context<Self>,
) -> Option<impl IntoElement> {
if matches!(self.git_access, GitAccess::No) {
return None;
}
let active_repository = self.active_repository.clone()?;
let panel_editor_style = panel_editor_style(true, window, cx);
let enable_coauthors = self.render_co_authors(cx);