Remove unnecessary code.

This commit is contained in:
zlsun 2014-06-16 14:08:11 +08:00
parent 12b03518ee
commit 6fdbc9cdfa
6 changed files with 4 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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