fix duplicate query searches from same global action keywords

This commit is contained in:
Jeremy 2021-05-28 08:44:06 +10:00
parent 08d428ea13
commit c5167cb5e5

View file

@ -118,7 +118,9 @@ namespace Flow.Launcher.Core.Plugin
_contextMenuPlugins = GetPluginsForInterface<IContextMenu>();
foreach (var plugin in AllPlugins)
{
foreach (var actionKeyword in plugin.Metadata.ActionKeywords)
// set distinct on each plugin's action keywords helps only firing global(*) and action keywords once where a plugin
// has multiple global and action keywords because we will only add them here once.
foreach (var actionKeyword in plugin.Metadata.ActionKeywords.Distinct())
{
switch (actionKeyword)
{