From c1ee47a79db926c6856f36392c897124b7c3b014 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 23 Aug 2024 10:28:16 +0800 Subject: [PATCH] code_style: remove unused code and run `dotnet format` --- src/ViewModels/Welcome.cs | 2 +- src/Views/Histories.axaml.cs | 4 +--- src/Views/Preference.axaml.cs | 2 +- src/Views/Welcome.axaml.cs | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ViewModels/Welcome.cs b/src/ViewModels/Welcome.cs index 03cbb528..d675a73f 100644 --- a/src/ViewModels/Welcome.cs +++ b/src/ViewModels/Welcome.cs @@ -255,7 +255,7 @@ namespace SourceGit.ViewModels if (node.IsRepository || !node.IsExpanded) continue; - MakeTreeRows(rows, node.SubNodes, depth+1); + MakeTreeRows(rows, node.SubNodes, depth + 1); } } diff --git a/src/Views/Histories.axaml.cs b/src/Views/Histories.axaml.cs index 19394e33..a73fa12b 100644 --- a/src/Views/Histories.axaml.cs +++ b/src/Views/Histories.axaml.cs @@ -477,7 +477,7 @@ namespace SourceGit.Views // Draw contents DrawCurves(context, graph, top, bottom); - DrawAnchors(context, graph, top, bottom); + DrawAnchors(context, graph, top, bottom); } private void DrawCurves(DrawingContext context, Models.CommitGraph graph, double top, double bottom) @@ -598,8 +598,6 @@ namespace SourceGit.Views } } } - - private Geometry _mergeIcon = null; } public partial class Histories : UserControl diff --git a/src/Views/Preference.axaml.cs b/src/Views/Preference.axaml.cs index 1c5d203a..28bdeeaa 100644 --- a/src/Views/Preference.axaml.cs +++ b/src/Views/Preference.axaml.cs @@ -259,7 +259,7 @@ namespace SourceGit.Views var dialog = new ConfirmRestart(); App.OpenDialog(dialog); } - + e.Handled = true; } } diff --git a/src/Views/Welcome.axaml.cs b/src/Views/Welcome.axaml.cs index 4d34eec1..91ba005c 100644 --- a/src/Views/Welcome.axaml.cs +++ b/src/Views/Welcome.axaml.cs @@ -45,7 +45,7 @@ namespace SourceGit.Views TreeContainer.Focus(NavigationMethod.Directional); e.Handled = true; } - else if (e.Key == Key.F && + else if (e.Key == Key.F && ((OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Meta)) || (!OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Control)))) {