From 0a01d85f4051f298d83b22fc024c6f0474e464b6 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Mon, 21 Jul 2025 16:16:21 +0800 Subject: [PATCH] Improve code quality --- Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 0b491175f..2299e4e98 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1327,7 +1327,7 @@ namespace Flow.Launcher.ViewModel private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true) { - _updateSource?.Cancel(); + await _updateSource?.CancelAsync(); App.API.LogDebug(ClassName, $"Start query with text: <{QueryText}>"); @@ -1906,7 +1906,7 @@ namespace Flow.Launcher.ViewModel if (DialogJump.DialogJumpWindowPosition == DialogJumpWindowPositions.UnderDialog) { // Cancel the previous Dialog Jump task - _dialogJumpSource?.Cancel(); + await _dialogJumpSource?.CancelAsync(); // Create a new cancellation token source _dialogJumpSource = new CancellationTokenSource();