Skip to content

Commit 36a4f41

Browse files
committed
Do not need to clear the result when last and current query are home query
1 parent 16404bc commit 36a4f41

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,8 +1544,13 @@ private async Task BuildQueryAsync(IEnumerable<BaseBuiltinShortcutModel> builtIn
15441544

15451545
private void RemoveOldQueryResults(Query query, bool isHomeQuery)
15461546
{
1547+
// If last and current query are home query, we don't need to clear the results
1548+
if (_lastIsHomeQuery && isHomeQuery)
1549+
{
1550+
return;
1551+
}
15471552
// If last or current query is home query, we need to clear the results
1548-
if (_lastIsHomeQuery || isHomeQuery)
1553+
else if (_lastIsHomeQuery || isHomeQuery)
15491554
{
15501555
App.API.LogDebug(ClassName, $"Remove old results");
15511556
Results.Clear();

0 commit comments

Comments
 (0)