Skip to content

Commit c4fbb3d

Browse files
committed
Check count
1 parent db1c1b2 commit c4fbb3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,10 @@ public static void ChangePluginHotkey(PluginMetadata plugin, SearchWindowPluginH
525525
// Update window plugin hotkey dictionary
526526
var oldHotkeyModels = _windowPluginHotkeys[oldHotkey];
527527
_windowPluginHotkeys[oldHotkey] = oldHotkeyModels.Where(x => x.Item1.ID != plugin.ID || x.Item2.Id != pluginHotkey.Id).ToList();
528+
if (_windowPluginHotkeys[oldHotkey].Count == 0)
529+
{
530+
_windowPluginHotkeys.Remove(oldHotkey);
531+
}
528532

529533
if (_windowPluginHotkeys.TryGetValue(newHotkey, out var newHotkeyModels))
530534
{

0 commit comments

Comments
 (0)