Reuse existing logic used to generate commit messages to disable commit buttons (#26034)

Also
- Recomputes `suggested_commit_message` and no longer stores it, to
ensure things are always up to date
- Reduces indentation in `render_footer`

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2025-03-04 08:50:53 -05:00 committed by GitHub
parent 7d22059a2f
commit 76a81607de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 109 additions and 119 deletions

View file

@ -337,6 +337,7 @@ impl CommitModal {
fn dismiss(&mut self, _: &menu::Cancel, _: &mut Window, cx: &mut Context<Self>) {
cx.emit(DismissEvent);
}
fn commit(&mut self, _: &git::Commit, window: &mut Window, cx: &mut Context<Self>) {
self.git_panel
.update(cx, |git_panel, cx| git_panel.commit_changes(window, cx));