From 28bd07d28b24d3bb602f8efeafe56c66026fa8e7 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 12 Jul 2025 15:18:18 +0800 Subject: [PATCH] Improve code quality --- Flow.Launcher/Helper/HotKeyMapper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs index 96df8d866..6082f4b28 100644 --- a/Flow.Launcher/Helper/HotKeyMapper.cs +++ b/Flow.Launcher/Helper/HotKeyMapper.cs @@ -483,9 +483,9 @@ internal static class HotKeyMapper if (existingBinding != null) { // If the hotkey is not a hotkey for ActionContext events, throw an exception to avoid duplicates - if (!IsActionContextEvent(window, existingBinding, hotkey)) + if (!IsActionContextEvent(existingBinding, hotkey)) { - throw new InvalidOperationException($"Windows key {hotkey} already exists"); + throw new InvalidOperationException($"Key {hotkey} already exists in window"); } } @@ -749,7 +749,7 @@ internal static class HotKeyMapper } [Obsolete("ActionContext support is deprecated and will be removed in a future release. Please use IPluginHotkey instead.")] - private static bool IsActionContextEvent(MainWindow window, KeyBinding existingBinding, HotkeyModel hotkey) + private static bool IsActionContextEvent(KeyBinding existingBinding, HotkeyModel hotkey) { // Check if this hotkey is a hotkey for ActionContext events if (!_actionContextHotkeyEvents.ContainsKey(hotkey) &&