This commit is contained in:
bao-qian
2015-11-07 02:23:40 +00:00
parent cae8485092
commit 7db73cbd44
8 changed files with 125 additions and 75 deletions

View File

@@ -1,7 +1,8 @@
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Newtonsoft.Json;
using Exceptionless.Json;
using JsonProperty = Newtonsoft.Json.JsonPropertyAttribute;
using Wox.Infrastructure.Storage;
namespace Wox.Plugin.Everything

View File

@@ -13,10 +13,9 @@ namespace Wox.Plugin.PluginIndicator
public List<Result> Query(Query query)
{
var results = from plugin in PluginManager.NonGlobalPlugins
select plugin.Metadata into metadata
from keyword in metadata.ActionKeywords
var results = from keyword in PluginManager.NonGlobalPlugins.Keys
where keyword.StartsWith(query.Terms[0])
let metadata = PluginManager.NonGlobalPlugins[keyword].Metadata
let customizedPluginConfig =
UserSettingStorage.Instance.CustomizedPluginConfigs.FirstOrDefault(o => o.ID == metadata.ID)
where customizedPluginConfig == null || !customizedPluginConfig.Disabled