refactor: use DataGrid instead of ListBox displaying history commits

Sometimes, `Grid.IsSharedSizeScope` does not work when navigating to the first commit

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-06-30 15:01:18 +08:00
parent db77c61dd5
commit 93ffbdd21d
8 changed files with 236 additions and 223 deletions

View File

@@ -871,7 +871,7 @@ namespace SourceGit.ViewModels
Task.Run(() =>
{
List<Models.Commit> visible = [];
var visible = new List<Models.Commit>();
var method = (Models.CommitSearchMethod)_searchCommitFilterType;
if (method == Models.CommitSearchMethod.BySHA)
@@ -880,8 +880,8 @@ namespace SourceGit.ViewModels
if (isCommitSHA)
{
var commit = new Commands.QuerySingleCommit(_fullpath, _searchCommitFilter).Result();
visible = [commit];
}
visible.Add(commit);
}
}
else
{