Refactor: Remove unused namespaces and hotkey converter

Simplified `PluginManager.cs` by removing unused `using`
directives, including `System.Windows.Input` and several
Flow Launcher-specific namespaces. Eliminated the
instantiation of `KeyGestureConverter` in the
`ChangePluginHotkey` method, reflecting a change in how
hotkeys are processed. These changes reduce dependencies
and streamline the codebase.
This commit is contained in:
Jack251970 2025-10-16 22:10:11 +08:00
parent 811239b158
commit f8e588b4e1

View file

@ -6,7 +6,6 @@ using System.Linq;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Input;
using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Infrastructure;
@ -944,7 +943,6 @@ namespace Flow.Launcher.Core.Plugin
var oldHotkeyItem = plugin.PluginHotkeys.First(h => h.Id == pluginHotkey.Id);
var settingHotkeyItem = Settings.GetPluginSettings(plugin.ID).pluginHotkeys.First(h => h.Id == pluginHotkey.Id);
var oldHotkeyStr = settingHotkeyItem.Hotkey;
var converter = new KeyGestureConverter();
var oldHotkey = new HotkeyModel(oldHotkeyStr);
var newHotkeyStr = newHotkey.ToString();