From b402bd6c0eae0aa8a841c59e6bb32c7ef3956a2f Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Tue, 18 Mar 2014 23:41:34 +0800 Subject: [PATCH] Remove useless codes. --- Wox/Commands/BaseCommand.cs | 2 +- Wox/Commands/CommandFactory.cs | 6 +++--- Wox/Commands/PluginCommand.cs | 4 ++-- Wox/Commands/SystemCommand.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Wox/Commands/BaseCommand.cs b/Wox/Commands/BaseCommand.cs index 0e5e7fa55..8a5283e77 100644 --- a/Wox/Commands/BaseCommand.cs +++ b/Wox/Commands/BaseCommand.cs @@ -8,7 +8,7 @@ namespace Wox.Commands { public abstract class BaseCommand { - public abstract void Dispatch(Query query, bool updateView = true); + public abstract void Dispatch(Query query); protected void UpdateResultView(List results) { diff --git a/Wox/Commands/CommandFactory.cs b/Wox/Commands/CommandFactory.cs index 6d54d2a37..1df62d5c0 100644 --- a/Wox/Commands/CommandFactory.cs +++ b/Wox/Commands/CommandFactory.cs @@ -12,7 +12,7 @@ namespace Wox.Commands private static PluginCommand pluginCmd; private static SystemCommand systemCmd; - public static void DispatchCommand(Query query, bool updateView = true) + public static void DispatchCommand(Query query) { //lazy init command instance. if (pluginCmd == null) @@ -24,8 +24,8 @@ namespace Wox.Commands systemCmd = new SystemCommand(); } - systemCmd.Dispatch(query,updateView); - pluginCmd.Dispatch(query,updateView); + systemCmd.Dispatch(query); + pluginCmd.Dispatch(query); } } } diff --git a/Wox/Commands/PluginCommand.cs b/Wox/Commands/PluginCommand.cs index 18dafe662..239d60a4d 100644 --- a/Wox/Commands/PluginCommand.cs +++ b/Wox/Commands/PluginCommand.cs @@ -14,7 +14,7 @@ namespace Wox.Commands private string currentPythonModulePath = string.Empty; private IntPtr GIL; - public override void Dispatch(Query q,bool updateView = true) + public override void Dispatch(Query q) { PluginPair thirdPlugin = Plugins.AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == q.ActionName); if (thirdPlugin != null && !string.IsNullOrEmpty(thirdPlugin.Metadata.ActionKeyword)) @@ -33,7 +33,7 @@ namespace Wox.Commands o.PluginDirectory = thirdPlugin.Metadata.PluginDirecotry; o.OriginQuery = q; }); - if(updateView) UpdateResultView(r); + UpdateResultView(r); } catch (Exception queryException) { diff --git a/Wox/Commands/SystemCommand.cs b/Wox/Commands/SystemCommand.cs index 8cfe94d43..f563c8096 100644 --- a/Wox/Commands/SystemCommand.cs +++ b/Wox/Commands/SystemCommand.cs @@ -17,7 +17,7 @@ namespace Wox.Commands systemPlugins = Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System).ToList(); } - public override void Dispatch(Query query,bool updateView = true) + public override void Dispatch(Query query) { foreach (PluginPair pair in systemPlugins) { @@ -31,7 +31,7 @@ namespace Wox.Commands result.OriginQuery = query; result.AutoAjustScore = true; } - if(results.Count > 0 && updateView) UpdateResultView(results); + if(results.Count > 0) UpdateResultView(results); }); } }