mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
update
This commit is contained in:
@@ -33,12 +33,13 @@ namespace Wox.Plugin.WebSearch
|
|||||||
|
|
||||||
public List<Result> Query(Query query)
|
public List<Result> Query(Query query)
|
||||||
{
|
{
|
||||||
|
var searchSourceList = new List<SearchSource>();
|
||||||
|
var results = new List<Result>();
|
||||||
|
|
||||||
_updateSource?.Cancel();
|
_updateSource?.Cancel();
|
||||||
_updateSource = new CancellationTokenSource();
|
_updateSource = new CancellationTokenSource();
|
||||||
_updateToken = _updateSource.Token;
|
_updateToken = _updateSource.Token;
|
||||||
|
|
||||||
var searchSourceList = new List<SearchSource>();
|
|
||||||
|
|
||||||
_settings.SearchSources.Where(o => (o.ActionKeyword == query.ActionKeyword || o.ActionKeyword == SearchSourceGlobalPluginWildCardSign)
|
_settings.SearchSources.Where(o => (o.ActionKeyword == query.ActionKeyword || o.ActionKeyword == SearchSourceGlobalPluginWildCardSign)
|
||||||
&& o.Enabled)
|
&& o.Enabled)
|
||||||
.ToList()
|
.ToList()
|
||||||
@@ -60,11 +61,10 @@ namespace Wox.Plugin.WebSearch
|
|||||||
SubTitle = string.Empty,
|
SubTitle = string.Empty,
|
||||||
IcoPath = searchSource.IconPath
|
IcoPath = searchSource.IconPath
|
||||||
};
|
};
|
||||||
return new List<Result> {result};
|
results.Add(result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var results = new List<Result>();
|
|
||||||
var result = new Result
|
var result = new Result
|
||||||
{
|
{
|
||||||
Title = title,
|
Title = title,
|
||||||
@@ -79,13 +79,12 @@ namespace Wox.Plugin.WebSearch
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
results.Add(result);
|
results.Add(result);
|
||||||
UpdateResultsFromSuggestion(results, keyword, subtitle, searchSource, query);
|
UpdateResultsFromSuggestion(results, keyword, subtitle, searchSource, query);
|
||||||
return results;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new List<Result>();
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateResultsFromSuggestion(List<Result> results, string keyword, string subtitle,
|
private void UpdateResultsFromSuggestion(List<Result> results, string keyword, string subtitle,
|
||||||
|
|||||||
Reference in New Issue
Block a user