mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Fix PluginIndicator for multiple action keywords
1. Fixup, part of #352 2. Refactoring
This commit is contained in:
@@ -29,8 +29,8 @@ namespace Wox.Core.Plugin
|
||||
|
||||
public static IEnumerable<PluginPair> AllPlugins { get; private set; }
|
||||
|
||||
private static List<PluginPair> GlobalPlugins { get; set; }
|
||||
private static List<PluginPair> NonGlobalPlugins { get; set; }
|
||||
public static IEnumerable<PluginPair> GlobalPlugins { get; private set; }
|
||||
public static IEnumerable<PluginPair> NonGlobalPlugins { get; private set; }
|
||||
|
||||
private static IEnumerable<PluginPair> InstantQueryPlugins { get; set; }
|
||||
public static IPublicAPI API { private set; get; }
|
||||
@@ -104,19 +104,8 @@ namespace Wox.Core.Plugin
|
||||
{
|
||||
InstantQueryPlugins = GetPluginsForInterface<IInstantQuery>();
|
||||
contextMenuPlugins = GetPluginsForInterface<IContextMenu>();
|
||||
GlobalPlugins = new List<PluginPair>();
|
||||
NonGlobalPlugins = new List<PluginPair>();
|
||||
foreach (var plugin in AllPlugins)
|
||||
{
|
||||
if (IsGlobalPlugin(plugin.Metadata))
|
||||
{
|
||||
GlobalPlugins.Add(plugin);
|
||||
}
|
||||
else
|
||||
{
|
||||
NonGlobalPlugins.Add(plugin);
|
||||
}
|
||||
}
|
||||
GlobalPlugins = AllPlugins.Where(p => IsGlobalPlugin(p.Metadata));
|
||||
NonGlobalPlugins = AllPlugins.Where(p => !IsGlobalPlugin(p.Metadata));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user