Put UpdateResultsListViewAfterQuery calls logic with inside addResultLock blocks (#14078)

This commit is contained in:
Stefan Markovic 2021-11-01 17:16:57 +01:00 committed by GitHub
parent e62df46c61
commit a881e6b3d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -574,12 +574,11 @@ namespace PowerLauncher.ViewModel
Results.Sort();
Results.SelectedItem = Results.Results.FirstOrDefault();
}
currentCancellationToken.ThrowIfCancellationRequested();
UpdateResultsListViewAfterQuery(queryText);
}
currentCancellationToken.ThrowIfCancellationRequested();
UpdateResultsListViewAfterQuery(queryText);
// Run the slower query of the DelayedExecution plugins
currentCancellationToken.ThrowIfCancellationRequested();
Parallel.ForEach(plugins, (plugin) =>
@ -611,10 +610,10 @@ namespace PowerLauncher.ViewModel
numResults = Results.Results.Count;
Results.Sort();
}
}
currentCancellationToken.ThrowIfCancellationRequested();
UpdateResultsListViewAfterQuery(queryText, true);
currentCancellationToken.ThrowIfCancellationRequested();
UpdateResultsListViewAfterQuery(queryText, true);
}
}
}
catch (OperationCanceledException)