From 6e94d1668bd6cf737322799093af6e197de7a02d Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 2 Jul 2025 13:09:13 +0800 Subject: [PATCH] Code quality --- Flow.Launcher/Helper/HotKeyMapper.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs index 8d84f5117..3fc2ec381 100644 --- a/Flow.Launcher/Helper/HotKeyMapper.cs +++ b/Flow.Launcher/Helper/HotKeyMapper.cs @@ -37,11 +37,6 @@ internal static class HotKeyMapper _settings = Ioc.Default.GetService(); InitializeRegisteredHotkeys(); - - foreach (var hotkey in _settings.RegisteredHotkeys) - { - SetHotkey(hotkey); - } } private static void InitializeRegisteredHotkeys() @@ -154,10 +149,11 @@ internal static class HotKeyMapper list.Add(new(RegisteredHotkeyType.PluginWindowHotkey, HotkeyType.SearchWindow, hotkeyModel, "pluginWindowHotkey", WindowPluginHotkeyCommand, new WindowPluginHotkeyPair(windowHotkeys))); } - // Add registered hotkeys + // Add registered hotkeys & Set them foreach (var hotkey in list) { _settings.RegisteredHotkeys.Add(hotkey); + SetHotkey(hotkey); } }