mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Merge
This commit is contained in:
@@ -9,7 +9,7 @@ using Wox.Plugin.WebSearch.SuggestionSources;
|
||||
|
||||
namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
public class WebSearchPlugin : IPlugin, ISettingProvider,IPluginI18n
|
||||
public class WebSearchPlugin : IPlugin, ISettingProvider, IPluginI18n, IInstantSearch
|
||||
{
|
||||
private PluginInitContext context;
|
||||
|
||||
@@ -97,5 +97,16 @@ namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Languages");
|
||||
}
|
||||
|
||||
public bool IsInstantSearch(string query)
|
||||
{
|
||||
var strings = query.Split(' ');
|
||||
if (strings.Length > 1)
|
||||
{
|
||||
return WebSearchStorage.Instance.EnableWebSearchSuggestion &&
|
||||
WebSearchStorage.Instance.WebSearches.Exists(o => o.ActionWord == strings[0] && o.Enabled);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user