mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Only return top 2 relevent results
This commit is contained in:
parent
574e711f33
commit
77afcc2293
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue