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>
This commit is contained in:
Smit Barmase 2025-05-09 12:50:25 -07:00 committed by GitHub
parent 65b13968a2
commit bef25c7290
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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