Skip to content

Commit a6e1661

Browse files
committed
fix: 修一下 QueryResultModel 的跨线程问题
1 parent 08357a8 commit a6e1661

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/CurvaLauncher/ViewModels/MainViewModel.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ await Task.Run(async () =>
8989
if (cancellationToken.IsCancellationRequested)
9090
return;
9191

92-
var model = new QueryResultModel(pluginInstance, result);
93-
queryResults.Add(model);
94-
9592
dispatcher.Invoke(() =>
9693
{
94+
var model = new QueryResultModel(pluginInstance, result);
95+
queryResults.Add(model);
96+
9797
for (int i = 0; i < queryResults.Count; i++)
9898
{
9999
if (QueryResults.Count > i)

0 commit comments

Comments
 (0)