Skip to content

Commit 9d972e6

Browse files
committed
Pass shouldClearExistingResults flag when overriding results
1 parent 4bb14fd commit 9d972e6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,16 @@ async Task UpdateActionAsync()
220220
var shouldClearExistingResults = ShouldClearExistingResultsForQuery(query, currentIsHomeQuery);
221221
_lastQuery = item.Query;
222222
_previousIsHomeQuery = currentIsHomeQuery;
223-
item.ShouldClearExistingResults = shouldClearExistingResults;
223+
224+
// If the queue already has the item, we need to pass the shouldClearExistingResults flag
225+
if (queue.TryGetValue(item.ID, out var existingItem))
226+
{
227+
item.ShouldClearExistingResults = shouldClearExistingResults || existingItem.ShouldClearExistingResults;
228+
}
229+
else
230+
{
231+
item.ShouldClearExistingResults = shouldClearExistingResults;
232+
}
224233

225234
queue[item.ID] = item;
226235
}

0 commit comments

Comments
 (0)