Skip to content

Commit 67facb8

Browse files
committed
Use non-async version
1 parent 0d9fb29 commit 67facb8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
13461346
// Query history results for home page firstly so it will be put on top of the results
13471347
if (Settings.ShowHistoryResultsForHomePage)
13481348
{
1349-
await QueryHistoryTaskAsync();
1349+
QueryHistoryTask();
13501350
}
13511351
}
13521352
else
@@ -1430,12 +1430,8 @@ await PluginManager.QueryHomeForPluginAsync(plugin, query, token) :
14301430
}
14311431
}
14321432

1433-
async Task QueryHistoryTaskAsync()
1433+
void QueryHistoryTask()
14341434
{
1435-
// Since it is wrapped within a ThreadPool Thread, the synchronous context is null
1436-
// Task.Yield will force it to run in ThreadPool
1437-
await Task.Yield();
1438-
14391435
// Select last history results and revert its order to make sure last history results are on top
14401436
var historyItems = _history.Items.TakeLast(Settings.MaxHistoryResultsToShowForHomePage).Reverse();
14411437

@@ -1448,8 +1444,6 @@ async Task QueryHistoryTaskAsync()
14481444
{
14491445
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
14501446
}
1451-
1452-
await Task.CompletedTask;
14531447
}
14541448
}
14551449

0 commit comments

Comments
 (0)