From 36a4f4176778253f00c09a7675ec43b07953282a Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Mon, 5 May 2025 17:32:43 +0800 Subject: [PATCH] Do not need to clear the result when last and current query are home query --- Flow.Launcher/ViewModel/MainViewModel.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 25c39ac7a..a8e431d99 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -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();