code_review: PR #1521

- Remove `ConfigureAwait(false)` since we need go back to UIThread
- Add Chinese translations for `Text.CommitCM.CopyCommitMessage`

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-07-05 21:30:38 +08:00
parent 151bfa1b59
commit 6c7a4e97b2
4 changed files with 9 additions and 8 deletions

View File

@@ -845,13 +845,12 @@ namespace SourceGit.ViewModels
e.Handled = true;
};
var copyFullInfo = new MenuItem();
copyFullInfo.Header = App.Text("CommitCM.CopyCommitMessage");
copyFullInfo.Icon = App.CreateMenuIcon("Icons.Info");
copyFullInfo.Click += async (_, e) =>
var copyMessage = new MenuItem();
copyMessage.Header = App.Text("CommitCM.CopyCommitMessage");
copyMessage.Icon = App.CreateMenuIcon("Icons.Info");
copyMessage.Click += async (_, e) =>
{
var message = await new Commands.QueryCommitFullMessage(_repo.FullPath, commit.SHA).
GetResultAsync().ConfigureAwait(false);
var message = await new Commands.QueryCommitFullMessage(_repo.FullPath, commit.SHA).GetResultAsync();
await App.CopyTextAsync(message);
e.Handled = true;
};
@@ -880,7 +879,7 @@ namespace SourceGit.ViewModels
copy.Items.Add(copySHA);
copy.Items.Add(copySubject);
copy.Items.Add(copyInfo);
copy.Items.Add(copyFullInfo);
copy.Items.Add(copyMessage);
copy.Items.Add(copyAuthor);
copy.Items.Add(copyCommitter);
menu.Items.Add(copy);