diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index d640a3cd15cfc8368e72dd163687dd00fddd6b4d..6c6b4de1e9a4ac6e7a7f6028d49c2f7b86c4f6b3 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -20,6 +20,7 @@ use editor::{ actions::ExpandAllDiffHunks, }; use editor::{EditorStyle, RewrapOptions}; +use feature_flags::{FeatureFlagAppExt as _, GitGraphFeatureFlag}; use file_icons::FileIcons; use futures::StreamExt as _; use git::commit::ParsedCommitMessage; @@ -4519,7 +4520,7 @@ impl GitPanel { fn render_previous_commit( &self, - window: &mut Window, + _window: &mut Window, cx: &mut Context, ) -> Option { let active_repository = self.active_repository.as_ref()?; @@ -4527,6 +4528,7 @@ impl GitPanel { let commit = branch.most_recent_commit.as_ref()?.clone(); let workspace = self.workspace.clone(); let this = cx.entity(); + let can_open_git_graph = cx.has_flag::(); Some( h_flex() @@ -4604,7 +4606,7 @@ impl GitPanel { ), ) }) - .when(window.is_action_available(&Open, cx), |this| { + .when(can_open_git_graph, |this| { this.child( panel_icon_button("git-graph-button", IconName::GitGraph) .icon_size(IconSize::Small)