diff --git a/src/Views/DropHead.axaml b/src/Views/DropHead.axaml index 91b41b85..34928c6f 100644 --- a/src/Views/DropHead.axaml +++ b/src/Views/DropHead.axaml @@ -2,7 +2,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:m="using:SourceGit.Models" xmlns:vm="using:SourceGit.ViewModels" xmlns:c="using:SourceGit.Converters" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" diff --git a/src/Views/EditRepositoryNode.axaml b/src/Views/EditRepositoryNode.axaml index 4b42434d..a7974824 100644 --- a/src/Views/EditRepositoryNode.axaml +++ b/src/Views/EditRepositoryNode.axaml @@ -2,7 +2,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:m="using:SourceGit.Models" xmlns:c="using:SourceGit.Converters" xmlns:vm="using:SourceGit.ViewModels" xmlns:v="using:SourceGit.Views" diff --git a/src/Views/Histories.axaml b/src/Views/Histories.axaml index 909dd770..361b0e3f 100644 --- a/src/Views/Histories.axaml +++ b/src/Views/Histories.axaml @@ -49,10 +49,6 @@ ContextRequested="OnCommitListContextRequested" DoubleTapped="OnCommitListDoubleTapped" KeyDown="OnCommitListKeyDown"> - - - - + diff --git a/src/Views/InteractiveRebase.axaml b/src/Views/InteractiveRebase.axaml index ba470c98..04d6fdab 100644 --- a/src/Views/InteractiveRebase.axaml +++ b/src/Views/InteractiveRebase.axaml @@ -70,7 +70,7 @@ (); + var selected = ItemListBox.SelectedItems ?? new List(); var items = new List(); foreach (var item in selected) { @@ -230,10 +230,10 @@ namespace SourceGit.Views return; var builder = new StringBuilder(); - var selected = IRItemListBox.SelectedItems ?? new List(); + var selected = ItemListBox.SelectedItems ?? new List(); if (selected.Count > 0 && !selected.Contains(item)) { - IRItemListBox.SelectedItem = item; + ItemListBox.SelectedItem = item; builder.Append(item.Commit.SHA).Append(';'); } else @@ -252,7 +252,7 @@ namespace SourceGit.Views private void OnRowDragOver(object sender, DragEventArgs e) { - if (DataContext is not ViewModels.InteractiveRebase vm) + if (DataContext is not ViewModels.InteractiveRebase) return; if (e.DataTransfer.TryGetValue(_dndItemFormat) is not { Length: > 0 } hashes) @@ -294,7 +294,7 @@ namespace SourceGit.Views if (hashes.IndexOf(dst.Commit.SHA, StringComparison.Ordinal) >= 0) return; - var selected = IRItemListBox.SelectedItems ?? new List(); + var selected = ItemListBox.SelectedItems ?? new List(); if (selected.Count == 0) return; @@ -310,7 +310,7 @@ namespace SourceGit.Views } vm.Move(commits, before ? idx : idx + 1); - IRItemListBox.SelectedItems = commits; + ItemListBox.SelectedItems = commits; dst.DropDirectionIndicator = new Thickness(0); e.DragEffects = DragDropEffects.None; @@ -322,7 +322,7 @@ namespace SourceGit.Views if (DataContext is not ViewModels.InteractiveRebase vm) return; - if (IRItemListBox.SelectedItems is not { Count: > 0 } selected) + if (ItemListBox.SelectedItems is not { Count: > 0 } selected) return; var hashes = new HashSet(); @@ -347,7 +347,7 @@ namespace SourceGit.Views } vm.Move(items, idx); - IRItemListBox.SelectedItems = items; + ItemListBox.SelectedItems = items; e.Handled = true; } @@ -356,7 +356,7 @@ namespace SourceGit.Views if (DataContext is not ViewModels.InteractiveRebase vm) return; - if (IRItemListBox.SelectedItems is not { Count: > 0 } selected) + if (ItemListBox.SelectedItems is not { Count: > 0 } selected) return; var hashes = new HashSet(); @@ -381,7 +381,7 @@ namespace SourceGit.Views } vm.Move(items, idx); - IRItemListBox.SelectedItems = items; + ItemListBox.SelectedItems = items; e.Handled = true; } @@ -461,7 +461,7 @@ namespace SourceGit.Views menuItem.Icon = new Ellipse() { Width = 14, Height = 14, Fill = iconBrush }; menuItem.Header = header; menuItem.Tag = hotkey; - menuItem.Click += (_, __) => ChangeItemsAction(item, action); + menuItem.Click += (_, _) => ChangeItemsAction(item, action); flyout.Items.Add(menuItem); } @@ -471,7 +471,7 @@ namespace SourceGit.Views if (DataContext is not ViewModels.InteractiveRebase vm) return; - var selected = IRItemListBox.SelectedItems ?? new List(); + var selected = ItemListBox.SelectedItems ?? new List(); var items = new List(); foreach (var item in selected) { @@ -491,7 +491,7 @@ namespace SourceGit.Views OpenCommitMessageEditor(items[0]); } - private bool _firstSelectionChangedHandled = false; + private bool _firstSelectionChangedHandled; private readonly DataFormat _dndItemFormat = DataFormat.CreateStringApplicationFormat("sourcegit-dnd-ir-item"); } } diff --git a/src/Views/PushToNewBranch.axaml b/src/Views/PushToNewBranch.axaml index a8546406..8961daed 100644 --- a/src/Views/PushToNewBranch.axaml +++ b/src/Views/PushToNewBranch.axaml @@ -47,7 +47,7 @@ v:AutoFocusBehaviour.IsEnabled="True"> - + diff --git a/src/Views/RenameBranch.axaml b/src/Views/RenameBranch.axaml index 1afb00c1..91c3891d 100644 --- a/src/Views/RenameBranch.axaml +++ b/src/Views/RenameBranch.axaml @@ -4,7 +4,6 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="using:SourceGit.ViewModels" xmlns:v="using:SourceGit.Views" - xmlns:c="using:SourceGit.Converters" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="SourceGit.Views.RenameBranch" x:DataType="vm:RenameBranch"> diff --git a/src/Views/RepositoryConfigure.axaml b/src/Views/RepositoryConfigure.axaml index df979c54..998334ed 100644 --- a/src/Views/RepositoryConfigure.axaml +++ b/src/Views/RepositoryConfigure.axaml @@ -381,10 +381,7 @@ - +