From de1a4d14e8a7a4e4a53bfb8aa649bf0cc24df3d0 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 1 Jul 2024 13:45:48 +0800 Subject: [PATCH] enhance: disable blame on submodules --- src/ViewModels/CommitDetail.cs | 1 + src/Views/RevisionFiles.axaml.cs | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ViewModels/CommitDetail.cs b/src/ViewModels/CommitDetail.cs index 35014cf4..c401f20a 100644 --- a/src/ViewModels/CommitDetail.cs +++ b/src/ViewModels/CommitDetail.cs @@ -319,6 +319,7 @@ namespace SourceGit.ViewModels var blame = new MenuItem(); blame.Header = App.Text("Blame"); blame.Icon = App.CreateMenuIcon("Icons.Blame"); + blame.IsEnabled = file.Type == Models.ObjectType.Blob; blame.Click += (o, ev) => { var window = new Views.Blame() { DataContext = new Blame(_repo, file.Path, _commit.SHA) }; diff --git a/src/Views/RevisionFiles.axaml.cs b/src/Views/RevisionFiles.axaml.cs index 4b4fc449..954f0ecc 100644 --- a/src/Views/RevisionFiles.axaml.cs +++ b/src/Views/RevisionFiles.axaml.cs @@ -9,8 +9,6 @@ using Avalonia.Controls.Primitives; using Avalonia.Controls.Templates; using Avalonia.Interactivity; using Avalonia.Media; -using Avalonia.Media.Imaging; -using Avalonia.Styling; using AvaloniaEdit; using AvaloniaEdit.Document;