mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove useless codes.
This commit is contained in:
parent
4f7c96326d
commit
b402bd6c0e
4 changed files with 8 additions and 8 deletions
|
|
@ -8,7 +8,7 @@ namespace Wox.Commands
|
||||||
{
|
{
|
||||||
public abstract class BaseCommand
|
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)
|
protected void UpdateResultView(List<Result> results)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace Wox.Commands
|
||||||
private static PluginCommand pluginCmd;
|
private static PluginCommand pluginCmd;
|
||||||
private static SystemCommand systemCmd;
|
private static SystemCommand systemCmd;
|
||||||
|
|
||||||
public static void DispatchCommand(Query query, bool updateView = true)
|
public static void DispatchCommand(Query query)
|
||||||
{
|
{
|
||||||
//lazy init command instance.
|
//lazy init command instance.
|
||||||
if (pluginCmd == null)
|
if (pluginCmd == null)
|
||||||
|
|
@ -24,8 +24,8 @@ namespace Wox.Commands
|
||||||
systemCmd = new SystemCommand();
|
systemCmd = new SystemCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
systemCmd.Dispatch(query,updateView);
|
systemCmd.Dispatch(query);
|
||||||
pluginCmd.Dispatch(query,updateView);
|
pluginCmd.Dispatch(query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace Wox.Commands
|
||||||
private string currentPythonModulePath = string.Empty;
|
private string currentPythonModulePath = string.Empty;
|
||||||
private IntPtr GIL;
|
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);
|
PluginPair thirdPlugin = Plugins.AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == q.ActionName);
|
||||||
if (thirdPlugin != null && !string.IsNullOrEmpty(thirdPlugin.Metadata.ActionKeyword))
|
if (thirdPlugin != null && !string.IsNullOrEmpty(thirdPlugin.Metadata.ActionKeyword))
|
||||||
|
|
@ -33,7 +33,7 @@ namespace Wox.Commands
|
||||||
o.PluginDirectory = thirdPlugin.Metadata.PluginDirecotry;
|
o.PluginDirectory = thirdPlugin.Metadata.PluginDirecotry;
|
||||||
o.OriginQuery = q;
|
o.OriginQuery = q;
|
||||||
});
|
});
|
||||||
if(updateView) UpdateResultView(r);
|
UpdateResultView(r);
|
||||||
}
|
}
|
||||||
catch (Exception queryException)
|
catch (Exception queryException)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace Wox.Commands
|
||||||
systemPlugins = Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System).ToList();
|
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)
|
foreach (PluginPair pair in systemPlugins)
|
||||||
{
|
{
|
||||||
|
|
@ -31,7 +31,7 @@ namespace Wox.Commands
|
||||||
result.OriginQuery = query;
|
result.OriginQuery = query;
|
||||||
result.AutoAjustScore = true;
|
result.AutoAjustScore = true;
|
||||||
}
|
}
|
||||||
if(results.Count > 0 && updateView) UpdateResultView(results);
|
if(results.Count > 0) UpdateResultView(results);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue