mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-31 00:54:59 +00:00
feature: add a button to see which branches and tags that contains selected commit (#388)
This commit is contained in:
parent
fcc8a41ad1
commit
6ab0900b20
14 changed files with 171 additions and 18 deletions
32
src/Views/CommitRelationTracking.axaml.cs
Normal file
32
src/Views/CommitRelationTracking.axaml.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
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;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue