Skip to content

Commit 94efd29

Browse files
committed
code_style: mark event handled for after dialog closed
Signed-off-by: leo <longshuang@msn.cn>
1 parent 4f25a35 commit 94efd29

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Views/CommitMessageToolBox.axaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,19 +568,22 @@ private async void OnOpenOpenAIHelper(object sender, RoutedEventArgs e)
568568
if (vm.Staged == null || vm.Staged.Count == 0)
569569
{
570570
App.RaiseException(repo.FullPath, "No files added to commit!");
571+
e.Handled = true;
571572
return;
572573
}
573574

574575
var services = repo.GetPreferredOpenAIServices();
575576
if (services.Count == 0)
576577
{
577578
App.RaiseException(repo.FullPath, "Bad configuration for OpenAI");
579+
e.Handled = true;
578580
return;
579581
}
580582

581583
if (services.Count == 1)
582584
{
583585
await App.ShowDialog(new ViewModels.AIAssistant(repo, services[0], vm.Staged));
586+
e.Handled = true;
584587
return;
585588
}
586589

src/Views/Launcher.axaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ protected override async void OnKeyDown(KeyEventArgs e)
179179
if (e is { KeyModifiers: KeyModifiers.None, Key: Key.F1 })
180180
{
181181
await App.ShowDialog(new Hotkeys());
182+
e.Handled = true;
182183
return;
183184
}
184185

0 commit comments

Comments
 (0)