mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 02:39:22 +08:00
Remove unnecessary code.
This commit is contained in:
parent
12b03518ee
commit
6fdbc9cdfa
@ -19,7 +19,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
if (string.IsNullOrEmpty(query.RawQuery) || query.RawQuery.EndsWith(" ") || query.RawQuery.Length <= 1) return new List<Result>();
|
||||
if (query.RawQuery.EndsWith(" ") || query.RawQuery.Length <= 1) return new List<Result>();
|
||||
|
||||
var fuzzyMather = FuzzyMatcher.Create(query.RawQuery);
|
||||
List<Bookmark> returnList = bookmarks.Where(o => MatchProgram(o, fuzzyMather)).ToList();
|
||||
|
@ -33,8 +33,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
if (string.IsNullOrEmpty(query.RawQuery)
|
||||
|| query.RawQuery.Length <= 2 // don't affect when user only input "e" or "i" keyword
|
||||
if (query.RawQuery.Length <= 2 // don't affect when user only input "e" or "i" keyword
|
||||
|| !regValidExpressChar.IsMatch(query.RawQuery)
|
||||
|| !IsBracketComplete(query.RawQuery)) return new List<Result>();
|
||||
|
||||
|
@ -51,7 +51,7 @@ namespace Wox.Plugin.SystemPlugins.Program
|
||||
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
if (string.IsNullOrEmpty(query.RawQuery) || query.RawQuery.EndsWith(" ") || query.RawQuery.Length <= 1) return new List<Result>();
|
||||
if (query.RawQuery.EndsWith(" ") || query.RawQuery.Length <= 1) return new List<Result>();
|
||||
|
||||
var fuzzyMather = FuzzyMatcher.Create(query.RawQuery);
|
||||
List<Program> returnList = installedList.Where(o => MatchProgram(o, fuzzyMather)).ToList();
|
||||
|
@ -25,7 +25,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
if (string.IsNullOrEmpty(query.RawQuery) || query.RawQuery.EndsWith(" ") || query.RawQuery.Length <= 1) return new List<Result>();
|
||||
if (query.RawQuery.EndsWith(" ") || query.RawQuery.Length <= 1) return new List<Result>();
|
||||
|
||||
List<Result> results = new List<Result>();
|
||||
|
||||
|
@ -16,7 +16,6 @@ namespace Wox.Plugin.SystemPlugins
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
if (string.IsNullOrEmpty(query.RawQuery)) return results;
|
||||
|
||||
foreach (PluginMetadata metadata in allPlugins.Select(o => o.Metadata))
|
||||
{
|
||||
|
@ -18,7 +18,6 @@ namespace Wox.Plugin.SystemPlugins
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
if (string.IsNullOrEmpty(query.ActionName)) return results;
|
||||
|
||||
WebSearch webSearch =
|
||||
UserSettingStorage.Instance.WebSearches.FirstOrDefault(o => o.ActionWord == query.ActionName && o.Enabled);
|
||||
|
Loading…
Reference in New Issue
Block a user