Skip to content

Commit f49a86a

Browse files
committed
Use Input to check equality & Revert part of logic
1 parent 6e38c3f commit f49a86a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public void RegisterResultsUpdatedEvent()
283283
var plugin = (IResultUpdated)pair.Plugin;
284284
plugin.ResultsUpdated += (s, e) =>
285285
{
286-
if (_updateQuery == null || e.Query.RawQuery != _updateQuery.RawQuery || e.Token.IsCancellationRequested)
286+
if (_updateQuery == null || e.Query.Input != _updateQuery.Input || e.Token.IsCancellationRequested)
287287
{
288288
return;
289289
}
@@ -311,10 +311,7 @@ public void RegisterResultsUpdatedEvent()
311311

312312
PluginManager.UpdatePluginMetadata(resultsCopy, pair.Metadata, e.Query);
313313

314-
if (_updateQuery == null || e.Query.RawQuery != _updateQuery.RawQuery || token.IsCancellationRequested)
315-
{
316-
return;
317-
}
314+
if (token.IsCancellationRequested) return;
318315

319316
App.API.LogDebug(ClassName, $"Update results for plugin <{pair.Metadata.Name}>");
320317

@@ -1436,7 +1433,7 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
14361433
_ = Task.Delay(200, currentCancellationToken).ContinueWith(_ =>
14371434
{
14381435
// start the progress bar if query takes more than 200 ms and this is the current running query and it didn't finish yet
1439-
if (_progressQuery != null && _progressQuery == query)
1436+
if (_progressQuery != null && _progressQuery.Input == query.Input)
14401437
{
14411438
ProgressBarVisibility = Visibility.Visible;
14421439
}

0 commit comments

Comments
 (0)