Skip to content

Commit 1948711

Browse files
committed
Add hotkey get function
1 parent 4874586 commit 1948711

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,11 @@ public static IList<PluginPair> GetTranslationPlugins()
442442
return _translationPlugins.Where(p => !PluginModified(p.Metadata.ID)).ToList();
443443
}
444444

445+
public static IList<PluginPair> GetHotkeyPlugins()
446+
{
447+
return _hotkeyPlugins.Where(p => !PluginModified(p.Metadata.ID)).ToList();
448+
}
449+
445450
public static List<Result> GetContextMenusForPlugin(Result result)
446451
{
447452
var results = new List<Result>();
@@ -488,7 +493,7 @@ public static Dictionary<PluginPair, List<BasePluginHotkey>> GetPluginHotkeyInfo
488493

489494
public static void UpdatePluginHotkeyInfoTranslations()
490495
{
491-
foreach (var plugin in _hotkeyPlugins)
496+
foreach (var plugin in GetHotkeyPlugins())
492497
{
493498
var newHotkeys = ((IPluginHotkey)plugin.Plugin).GetPuginHotkeys();
494499
if (_pluginHotkeyInfo.TryGetValue(plugin, out var oldHotkeys))
@@ -515,7 +520,7 @@ public static void UpdatePluginHotkeyInfoTranslations()
515520

516521
private static void InitializePluginHotkeyInfo()
517522
{
518-
foreach (var plugin in _hotkeyPlugins)
523+
foreach (var plugin in GetHotkeyPlugins())
519524
{
520525
var hotkeys = ((IPluginHotkey)plugin.Plugin).GetPuginHotkeys();
521526
_pluginHotkeyInfo.Add(plugin, hotkeys);

0 commit comments

Comments
 (0)