git_ui: Fix co-author tooltip message (cherry-pick #30426) (#30429)

gcp-cherry-pick-bot[bot] , Smit Barmase , and Ben Kunkle created

Cherry-picked git_ui: Fix co-author tooltip message (#30426)

It should show "Remove co-authored-by" when hovering on co-author is
already added state. And should say
"Add co-authored-by" when it is at disabled state.

Release Notes:

- N/A

Co-authored-by: Ben Kunkle <ben@zed.dev>

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>

Change summary

crates/git_ui/src/git_panel.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

crates/git_ui/src/git_panel.rs 🔗

@@ -2765,9 +2765,9 @@ impl GitPanel {
         let potential_co_authors = self.potential_co_authors(cx);
 
         let (tooltip_label, icon) = if self.add_coauthors {
-            ("Add co-authored-by", IconName::UserCheck)
-        } else {
             ("Remove co-authored-by", IconName::Person)
+        } else {
+            ("Add co-authored-by", IconName::UserCheck)
         };
 
         if potential_co_authors.is_empty() {