sourcegit/src/Views/CommitRelationTracking.axaml.cs

33 lines
772 B
C#
Raw Normal View History

using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Threading;
namespace SourceGit.Views
{
public partial class CommitRelationTracking : UserControl
{
public CommitRelationTracking()
{
InitializeComponent();
}
public CommitRelationTracking(ViewModels.CommitDetail detail)
{
InitializeComponent();
LoadingIcon.IsVisible = true;
Task.Run(() =>
{
var containsIn = detail.GetRefsContainsThisCommit();
Dispatcher.UIThread.Invoke(() =>
{
Container.ItemsSource = containsIn;
LoadingIcon.IsVisible = false;
});
});
}
}
}