mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-05 02:54:59 +00:00
23 lines
591 B
C#
23 lines
591 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Input;
|
|
using Avalonia.VisualTree;
|
|
|
|
namespace SourceGit.Views
|
|
{
|
|
public partial class Conflict : UserControl
|
|
{
|
|
public Conflict()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void OnPressedSHA(object sender, PointerPressedEventArgs e)
|
|
{
|
|
var repoView = this.FindAncestorOfType<Repository>();
|
|
if (repoView is { DataContext: ViewModels.Repository repo } && sender is TextBlock text)
|
|
repo.NavigateToCommit(text.Text);
|
|
|
|
e.Handled = true;
|
|
}
|
|
}
|
|
}
|