fix: app crashed after enable Show children in the commit details (#1072)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-03-10 11:33:38 +08:00
parent 855466686d
commit df6cbcaa28
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ namespace SourceGit.Commands
Args = $"rev-list -{max} --parents --branches --remotes ^{commit}"; Args = $"rev-list -{max} --parents --branches --remotes ^{commit}";
} }
public IEnumerable<string> Result() public List<string> Result()
{ {
Exec(); Exec();
return _lines; return _lines;

View file

@ -615,7 +615,7 @@ namespace SourceGit.ViewModels
var cmdChildren = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, max) { Cancel = _cancelToken }; var cmdChildren = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, max) { Cancel = _cancelToken };
var children = cmdChildren.Result(); var children = cmdChildren.Result();
if (!cmdChildren.Cancel.Requested) if (!cmdChildren.Cancel.Requested)
Dispatcher.UIThread.Post(() => Children.AddRange(children)); Dispatcher.UIThread.Post(() => Children = children);
}); });
} }