From 1057f4d2f652b25e0ab2410af7e77d2d1dfac7b0 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 2 Jul 2025 14:09:29 +0800 Subject: [PATCH] Improve code quality --- Flow.Launcher/Helper/HotKeyMapper.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs index c7bcb0a17..af936d59f 100644 --- a/Flow.Launcher/Helper/HotKeyMapper.cs +++ b/Flow.Launcher/Helper/HotKeyMapper.cs @@ -535,14 +535,17 @@ internal static class HotKeyMapper private static void GlobalPluginHotkey(GlobalPluginHotkeyPair pair) { - if (pair.Metadata.Disabled || // Check plugin enabled state - App.API.PluginModified(pair.Metadata.ID)) // Check plugin modified state + var metadata = pair.Metadata; + var pluginHotkey = pair.GlobalPluginHotkey; + + if (metadata.Disabled || // Check plugin enabled state + App.API.PluginModified(metadata.ID)) // Check plugin modified state return; if (_mainViewModel.ShouldIgnoreHotkeys()) return; - pair.GlobalPluginHotkey.Action?.Invoke(); + pluginHotkey.Action?.Invoke(); } private static void WindowPluginHotkey(WindowPluginHotkeyPair pair)