mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Remove useless codes.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user