[PTRun]Don't show results from other plugins when using keyword (#19206)

This commit is contained in:
Davide Giacometti
2022-07-15 11:38:11 +02:00
committed by GitHub
parent 8e2570033c
commit 996a235e12
9 changed files with 53 additions and 35 deletions

View File

@@ -46,8 +46,7 @@ namespace Microsoft.Plugin.Uri
{
var results = new List<Result>();
if (IsActivationKeyword(query)
&& BrowserInfo.IsDefaultBrowserSet)
if (string.IsNullOrWhiteSpace(query?.Search) && BrowserInfo.IsDefaultBrowserSet)
{
results.Add(new Result
{
@@ -104,12 +103,6 @@ namespace Microsoft.Plugin.Uri
return results;
}
private static bool IsActivationKeyword(Query query)
{
return !string.IsNullOrEmpty(query?.ActionKeyword)
&& query?.ActionKeyword == query?.RawQuery;
}
public void Init(PluginInitContext context)
{
Context = context ?? throw new ArgumentNullException(nameof(context));