From 1bda9d5a26c5cdfae3cad65a29b2218889b224b4 Mon Sep 17 00:00:00 2001 From: renzhn Date: Thu, 27 Aug 2015 20:27:14 +0800 Subject: [PATCH] fix disable plugin not working --- Wox.Core/Plugin/QueryDispatcher/BaseQueryDispatcher.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Wox.Core/Plugin/QueryDispatcher/BaseQueryDispatcher.cs b/Wox.Core/Plugin/QueryDispatcher/BaseQueryDispatcher.cs index 6c5c562c8c..b17875b6ef 100644 --- a/Wox.Core/Plugin/QueryDispatcher/BaseQueryDispatcher.cs +++ b/Wox.Core/Plugin/QueryDispatcher/BaseQueryDispatcher.cs @@ -6,6 +6,7 @@ using System.Text; using System.Threading; using Wox.Infrastructure; using Wox.Plugin; +using Wox.Core.UserSettings; namespace Wox.Core.Plugin.QueryDispatcher { @@ -17,6 +18,12 @@ namespace Wox.Core.Plugin.QueryDispatcher { foreach (PluginPair pair in GetPlugins(query)) { + var customizedPluginConfig = UserSettingStorage.Instance. + CustomizedPluginConfigs.FirstOrDefault(o => o.ID == pair.Metadata.ID); + if (customizedPluginConfig != null && customizedPluginConfig.Disabled) + { + return; + } PluginPair localPair = pair; if (query.IsIntantQuery && PluginManager.IsInstantSearchPlugin(pair.Metadata)) {