Skip to content

Commit df6cbca

Browse files
committed
fix: app crashed after enable Show children in the commit details (#1072)
Signed-off-by: leo <[email protected]>
1 parent 8554666 commit df6cbca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Commands/QueryCommitChildren.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public QueryCommitChildren(string repo, string commit, int max)
1212
Args = $"rev-list -{max} --parents --branches --remotes ^{commit}";
1313
}
1414

15-
public IEnumerable<string> Result()
15+
public List<string> Result()
1616
{
1717
Exec();
1818
return _lines;

src/ViewModels/CommitDetail.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ private void Refresh()
615615
var cmdChildren = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, max) { Cancel = _cancelToken };
616616
var children = cmdChildren.Result();
617617
if (!cmdChildren.Cancel.Requested)
618-
Dispatcher.UIThread.Post(() => Children.AddRange(children));
618+
Dispatcher.UIThread.Post(() => Children = children);
619619
});
620620
}
621621

0 commit comments

Comments
 (0)