From 94efd295091927d208f8fdd19d599eb2b68cf51c Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 12 Mar 2026 16:36:14 +0800 Subject: [PATCH] code_style: mark event handled for after dialog closed Signed-off-by: leo --- src/Views/CommitMessageToolBox.axaml.cs | 3 +++ src/Views/Launcher.axaml.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/Views/CommitMessageToolBox.axaml.cs b/src/Views/CommitMessageToolBox.axaml.cs index 52579583..5c3480ee 100644 --- a/src/Views/CommitMessageToolBox.axaml.cs +++ b/src/Views/CommitMessageToolBox.axaml.cs @@ -568,6 +568,7 @@ namespace SourceGit.Views if (vm.Staged == null || vm.Staged.Count == 0) { App.RaiseException(repo.FullPath, "No files added to commit!"); + e.Handled = true; return; } @@ -575,12 +576,14 @@ namespace SourceGit.Views if (services.Count == 0) { App.RaiseException(repo.FullPath, "Bad configuration for OpenAI"); + e.Handled = true; return; } if (services.Count == 1) { await App.ShowDialog(new ViewModels.AIAssistant(repo, services[0], vm.Staged)); + e.Handled = true; return; } diff --git a/src/Views/Launcher.axaml.cs b/src/Views/Launcher.axaml.cs index 9652aca2..a1cd3d92 100644 --- a/src/Views/Launcher.axaml.cs +++ b/src/Views/Launcher.axaml.cs @@ -179,6 +179,7 @@ namespace SourceGit.Views if (e is { KeyModifiers: KeyModifiers.None, Key: Key.F1 }) { await App.ShowDialog(new Hotkeys()); + e.Handled = true; return; }