From 6c025507b64455e1af3a080ef4a9c4d279b32206 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Thu, 6 Mar 2025 17:40:17 -0800 Subject: [PATCH] Restore co-author hiding (#26257) Release Notes: - N/A --- crates/git_ui/src/git_panel.rs | 62 +++++++++++++++++----------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index 241f0505c1..d1d9e9a8c4 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -2243,37 +2243,37 @@ impl GitPanel { pub(crate) fn render_co_authors(&self, cx: &Context) -> Option { let potential_co_authors = self.potential_co_authors(cx); - // if potential_co_authors.is_empty() { - // None - // } else { - Some( - IconButton::new("co-authors", IconName::Person) - .shape(ui::IconButtonShape::Square) - .icon_color(Color::Disabled) - .selected_icon_color(Color::Selected) - .toggle_state(self.add_coauthors) - .tooltip(move |_, cx| { - let title = format!( - "Add co-authored-by:{}{}", - if potential_co_authors.len() == 1 { - "" - } else { - "\n" - }, - potential_co_authors - .iter() - .map(|(name, email)| format!(" {} <{}>", name, email)) - .join("\n") - ); - Tooltip::simple(title, cx) - }) - .on_click(cx.listener(|this, _, _, cx| { - this.add_coauthors = !this.add_coauthors; - cx.notify(); - })) - .into_any_element(), - ) - // } + if potential_co_authors.is_empty() { + None + } else { + Some( + IconButton::new("co-authors", IconName::Person) + .shape(ui::IconButtonShape::Square) + .icon_color(Color::Disabled) + .selected_icon_color(Color::Selected) + .toggle_state(self.add_coauthors) + .tooltip(move |_, cx| { + let title = format!( + "Add co-authored-by:{}{}", + if potential_co_authors.len() == 1 { + "" + } else { + "\n" + }, + potential_co_authors + .iter() + .map(|(name, email)| format!(" {} <{}>", name, email)) + .join("\n") + ); + Tooltip::simple(title, cx) + }) + .on_click(cx.listener(|this, _, _, cx| { + this.add_coauthors = !this.add_coauthors; + cx.notify(); + })) + .into_any_element(), + ) + } } pub fn configure_commit_button(&self, cx: &mut Context) -> (bool, &'static str) {