Remove useless codes.

This commit is contained in:
qianlifeng
2014-03-18 23:41:34 +08:00
parent 4f7c96326d
commit b402bd6c0e
4 changed files with 8 additions and 8 deletions

View File

@@ -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<Result> results)
{

View File

@@ -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);
}
}
}

View File

@@ -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)
{

View File

@@ -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);
});
}
}