diff --git a/src/App.Commands.cs b/src/App.Commands.cs index 55241afc..4a594766 100644 --- a/src/App.Commands.cs +++ b/src/App.Commands.cs @@ -43,7 +43,7 @@ namespace SourceGit private Action _action = null; } - + public static readonly SimpleCommand OpenPreferenceCommand = new SimpleCommand(() => OpenDialog(new Views.Preference())); public static readonly SimpleCommand OpenHotkeysCommand = new SimpleCommand(() => OpenDialog(new Views.Hotkeys())); public static readonly SimpleCommand OpenAppDataDirCommand = new SimpleCommand(() => Native.OS.OpenInFileManager(Native.OS.DataDir)); diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 5dab4836..98d671d3 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -98,7 +98,7 @@ namespace SourceGit public static void OpenDialog(Window window) { - if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner}) + if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner }) window.ShowDialog(owner); } diff --git a/src/Models/CommitGraph.cs b/src/Models/CommitGraph.cs index 0cfbb18a..fde8011c 100644 --- a/src/Models/CommitGraph.cs +++ b/src/Models/CommitGraph.cs @@ -213,7 +213,7 @@ namespace SourceGit.Models unsolved.Add(major); temp.Paths.Add(major.Path); } - + colorIdx = (colorIdx + 1) % _penCount; } diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index 5c289d8c..4cdf37eb 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -302,7 +302,7 @@ namespace SourceGit.ViewModels e.Handled = true; }; menu.Items.Add(reset); - + var squash = new MenuItem(); squash.Header = App.Text("CommitCM.SquashCommitsSinceThis"); squash.Icon = App.CreateMenuIcon("Icons.SquashIntoParent"); @@ -314,7 +314,7 @@ namespace SourceGit.ViewModels App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first."); return; } - + if (PopupHost.CanCreatePopup()) PopupHost.ShowPopup(new Squash(_repo, commit, commit.SHA)); diff --git a/src/ViewModels/LauncherPage.cs b/src/ViewModels/LauncherPage.cs index 4e831dbc..71d4a634 100644 --- a/src/ViewModels/LauncherPage.cs +++ b/src/ViewModels/LauncherPage.cs @@ -28,7 +28,7 @@ namespace SourceGit.ViewModels { _node = new RepositoryNode() { Id = Guid.NewGuid().ToString() }; _data = Welcome.Instance; - + // New welcome page will clear the search filter before. Welcome.Instance.ClearSearchFilter(); } diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 756d324e..c63243ee 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -614,7 +614,7 @@ namespace SourceGit.ViewModels Task.Run(RefreshWorkingCopyChanges); Task.Run(RefreshWorktrees); - } + } else { _watcher.MarkBranchDirtyManually(); diff --git a/src/ViewModels/Squash.cs b/src/ViewModels/Squash.cs index d7426135..b4c2fa31 100644 --- a/src/ViewModels/Squash.cs +++ b/src/ViewModels/Squash.cs @@ -22,7 +22,7 @@ namespace SourceGit.ViewModels _repo = repo; _target = target; _message = new Commands.QueryCommitFullMessage(_repo.FullPath, shaToGetPreferMessage).Result(); - + View = new Views.Squash() { DataContext = this }; } diff --git a/src/Views/AddWorktree.axaml.cs b/src/Views/AddWorktree.axaml.cs index c47dca7d..30369247 100644 --- a/src/Views/AddWorktree.axaml.cs +++ b/src/Views/AddWorktree.axaml.cs @@ -27,7 +27,7 @@ namespace SourceGit.Views } catch (Exception exception) { - App.RaiseException(string.Empty, $"Failed to select location: {exception.Message}"); + App.RaiseException(string.Empty, $"Failed to select location: {exception.Message}"); } e.Handled = true; diff --git a/src/Views/Histories.axaml.cs b/src/Views/Histories.axaml.cs index f8da37b2..46c73300 100644 --- a/src/Views/Histories.axaml.cs +++ b/src/Views/Histories.axaml.cs @@ -6,7 +6,6 @@ using Avalonia; using Avalonia.Collections; using Avalonia.Controls; using Avalonia.Controls.Documents; -using Avalonia.Controls.Primitives; using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Media; @@ -689,7 +688,7 @@ namespace SourceGit.Views private void OnCommitListKeyDown(object sender, KeyEventArgs e) { - if (sender is ListBox { SelectedItems: { Count : > 0 } selected } && + if (sender is ListBox { SelectedItems: { Count: > 0 } selected } && e.Key == Key.C && e.KeyModifiers.HasFlag(KeyModifiers.Control)) {