mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +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();
|
string myQuery = query.RawQuery.Trim();
|
||||||
|
|
||||||
List<Result> results = new List<Result>();
|
List<Result> results = new List<Result>();
|
||||||
|
List<Result> filteredResults = new List<Result>();
|
||||||
|
|
||||||
foreach (var item in controlPanelItems)
|
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