sourcegit/src/Views/FileHistories.axaml.cs
leo 98612b0024
code_style: remove unused code
Signed-off-by: leo <longshuang@msn.cn>
2024-11-01 10:00:37 +08:00

42 lines
1.1 KiB
C#

using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
namespace SourceGit.Views
{
public partial class FileHistories : ChromelessWindow
{
public FileHistories()
{
InitializeComponent();
}
private void OnPressCommitSHA(object sender, PointerPressedEventArgs e)
{
if (sender is TextBlock { DataContext: Models.Commit commit } &&
DataContext is ViewModels.FileHistories vm)
{
vm.NavigateToCommit(commit);
}
e.Handled = true;
}
private void OnResetToSelectedRevision(object _, RoutedEventArgs e)
{
if (DataContext is ViewModels.FileHistories vm)
{
vm.ResetToSelectedRevision();
NotifyDonePanel.IsVisible = true;
}
e.Handled = true;
}
private void OnCloseNotifyPanel(object _, PointerPressedEventArgs e)
{
NotifyDonePanel.IsVisible = false;
e.Handled = true;
}
}
}