Do not need to clear the result when last and current query are home query

This commit is contained in:
Jack251970 2025-05-05 17:32:43 +08:00
parent 16404bc2a7
commit 36a4f41767

View file

@ -1544,8 +1544,13 @@ namespace Flow.Launcher.ViewModel
private void RemoveOldQueryResults(Query query, bool isHomeQuery)
{
// If last and current query are home query, we don't need to clear the results
if (_lastIsHomeQuery && isHomeQuery)
{
return;
}
// If last or current query is home query, we need to clear the results
if (_lastIsHomeQuery || isHomeQuery)
else if (_lastIsHomeQuery || isHomeQuery)
{
App.API.LogDebug(ClassName, $"Remove old results");
Results.Clear();