Skip to content

Commit 3718796

Browse files
committed
Fix history results clear logic
1 parent 7c8a437 commit 3718796

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,8 +1284,6 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
12841284
// Update the query's IsReQuery property to true if this is a re-query
12851285
query.IsReQuery = isReQuery;
12861286

1287-
1288-
12891287
ICollection<PluginPair> plugins = Array.Empty<PluginPair>();
12901288
if (currentIsHomeQuery)
12911289
{
@@ -1458,8 +1456,13 @@ void QueryHistoryTask(CancellationToken token)
14581456

14591457
App.API.LogDebug(ClassName, $"Update results for history");
14601458

1459+
// Indicate if to clear existing results so to show only ones from plugins with action keywords
1460+
var shouldClearExistingResults = ShouldClearExistingResults(query, currentIsHomeQuery);
1461+
_lastQuery = query;
1462+
_previousIsHomeQuery = currentIsHomeQuery;
1463+
14611464
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(results, _historyMetadata, query,
1462-
token)))
1465+
token, reSelect, shouldClearExistingResults)))
14631466
{
14641467
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
14651468
}

0 commit comments

Comments
 (0)