Skip to content

Commit 1c0c9e7

Browse files
committed
Await cancel async
1 parent 27ea2e4 commit 1c0c9e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ private static List<Result> GetHistoryItems(IEnumerable<HistoryItem> historyItem
13331333

13341334
private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true)
13351335
{
1336-
_updateSource?.CancelAsync();
1336+
await _updateSource?.CancelAsync();
13371337
_progressQuery = null;
13381338

13391339
App.API.LogDebug(ClassName, $"Start query with text: <{QueryText}>");
@@ -1927,7 +1927,7 @@ public async Task SetupDialogJumpAsync(nint handle)
19271927
if (DialogJump.DialogJumpWindowPosition == DialogJumpWindowPositions.UnderDialog)
19281928
{
19291929
// Cancel the previous Dialog Jump task
1930-
_dialogJumpSource?.CancelAsync();
1930+
await _dialogJumpSource?.CancelAsync();
19311931

19321932
// Create a new cancellation token source
19331933
_dialogJumpSource = new CancellationTokenSource();

0 commit comments

Comments
 (0)