mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Only return top 2 relevent results
This commit is contained in:
@@ -59,6 +59,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
||||
string myQuery = query.RawQuery.Trim();
|
||||
|
||||
List<Result> results = new List<Result>();
|
||||
List<Result> filteredResults = new List<Result>();
|
||||
|
||||
foreach (var item in controlPanelItems)
|
||||
{
|
||||
@@ -109,7 +110,12 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
for (int i = 0; i < 2 && i < results.Count; i++)
|
||||
{
|
||||
filteredResults.Add(results[i]);
|
||||
}
|
||||
|
||||
return filteredResults;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user