feature: add children list to the commit base info view (#673)

This commit is contained in:
Dmitrij D. Czarkoff 2024-11-11 01:24:49 +00:00 committed by GitHub
parent e2e79fe1b3
commit 03f96cc9f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 88 additions and 7 deletions

View file

@ -78,6 +78,12 @@ namespace SourceGit.ViewModels
}
}
public AvaloniaList<string> Children
{
get;
private set;
} = new AvaloniaList<string>();
public string SearchChangeFilter
{
get => _searchChangeFilter;
@ -496,6 +502,7 @@ namespace SourceGit.ViewModels
VisibleChanges = null;
SelectedChanges = null;
ViewRevisionFileContent = null;
Children.Clear();
if (_commit == null)
return;
@ -512,6 +519,12 @@ namespace SourceGit.ViewModels
Dispatcher.UIThread.Invoke(() => SignInfo = signInfo);
});
Task.Run(() =>
{
var children = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA).Result();
Dispatcher.UIThread.Invoke(() => Children.AddRange(children));
});
if (_cancelToken != null)
_cancelToken.Requested = true;