Skip to content

Commit

Permalink
fix: 修一下 QueryResultModel 的跨线程问题
Browse files Browse the repository at this point in the history
  • Loading branch information
SlimeNull committed Dec 29, 2024
1 parent 08357a8 commit a6e1661
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CurvaLauncher/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ await Task.Run(async () =>
if (cancellationToken.IsCancellationRequested)
return;

var model = new QueryResultModel(pluginInstance, result);
queryResults.Add(model);

dispatcher.Invoke(() =>
{
var model = new QueryResultModel(pluginInstance, result);
queryResults.Add(model);

for (int i = 0; i < queryResults.Count; i++)
{
if (QueryResults.Count > i)
Expand Down

0 comments on commit a6e1661

Please sign in to comment.