diff --git a/src/App.axaml.cs b/src/App.axaml.cs index bd39e857..ef9398d9 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -356,6 +356,7 @@ namespace SourceGit else { _ipcChannel.MessageReceived += TryOpenRepository; + desktop.Exit += (_, _) => _ipcChannel.Dispose(); TryLaunchAsNormal(desktop); } } @@ -500,7 +501,6 @@ namespace SourceGit _launcher = new ViewModels.Launcher(startupRepo); desktop.MainWindow = new Views.Launcher() { DataContext = _launcher }; - desktop.Exit += (_, _) => _ipcChannel.Dispose(); #if !DISABLE_UPDATE_DETECTION if (pref.ShouldCheck4UpdateOnStartup()) diff --git a/src/Commands/Diff.cs b/src/Commands/Diff.cs index 040fd5f8..87fc6671 100644 --- a/src/Commands/Diff.cs +++ b/src/Commands/Diff.cs @@ -58,7 +58,7 @@ namespace SourceGit.Commands { ProcessInlineHighlights(); _result.TextDiff.MaxLineNumber = Math.Max(_newLine, _oldLine); - } + } return _result; } diff --git a/src/Models/IpcChannel.cs b/src/Models/IpcChannel.cs index eac67a85..2ecfb771 100644 --- a/src/Models/IpcChannel.cs +++ b/src/Models/IpcChannel.cs @@ -79,7 +79,7 @@ namespace SourceGit.Models try { await _server.WaitForConnectionAsync(_cancellationTokenSource.Token); - + if (!_cancellationTokenSource.IsCancellationRequested) { var line = await reader.ReadToEndAsync(_cancellationTokenSource.Token); diff --git a/src/Views/ConfigureWorkspace.axaml.cs b/src/Views/ConfigureWorkspace.axaml.cs index 8ef5dec7..43b28e2f 100644 --- a/src/Views/ConfigureWorkspace.axaml.cs +++ b/src/Views/ConfigureWorkspace.axaml.cs @@ -1,7 +1,7 @@ +using System; using Avalonia.Controls; using Avalonia.Interactivity; using Avalonia.Platform.Storage; -using System; namespace SourceGit.Views {