@@ -1333,7 +1333,7 @@ private static List<Result> GetHistoryItems(IEnumerable<HistoryItem> historyItem
1333
1333
1334
1334
private async Task QueryResultsAsync ( bool searchDelay , bool isReQuery = false , bool reSelect = true )
1335
1335
{
1336
- _updateSource ? . Cancel ( ) ;
1336
+ _updateSource ? . CancelAsync ( ) ;
1337
1337
_progressQuery = null ;
1338
1338
1339
1339
App . API . LogDebug ( ClassName , $ "Start query with text: <{ QueryText } >") ;
@@ -1425,16 +1425,16 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
1425
1425
}*/
1426
1426
1427
1427
_ = Task . Delay ( 200 , currentCancellationToken ) . ContinueWith ( _ =>
1428
+ {
1429
+ // start the progress bar if query takes more than 200 ms and this is the current running query and it didn't finish yet
1430
+ if ( _progressQuery != null && _progressQuery == query )
1428
1431
{
1429
- // start the progress bar if query takes more than 200 ms and this is the current running query and it didn't finish yet
1430
- if ( _progressQuery != null && _progressQuery == query )
1431
- {
1432
- ProgressBarVisibility = Visibility . Visible ;
1433
- }
1434
- } ,
1435
- currentCancellationToken ,
1436
- TaskContinuationOptions . NotOnCanceled ,
1437
- TaskScheduler . Default ) ;
1432
+ ProgressBarVisibility = Visibility . Visible ;
1433
+ }
1434
+ } ,
1435
+ currentCancellationToken ,
1436
+ TaskContinuationOptions . NotOnCanceled ,
1437
+ TaskScheduler . Default ) ;
1438
1438
1439
1439
// plugins are ICollection, meaning LINQ will get the Count and preallocate Array
1440
1440
@@ -1927,7 +1927,7 @@ public async Task SetupDialogJumpAsync(nint handle)
1927
1927
if ( DialogJump . DialogJumpWindowPosition == DialogJumpWindowPositions . UnderDialog )
1928
1928
{
1929
1929
// Cancel the previous Dialog Jump task
1930
- _dialogJumpSource ? . Cancel ( ) ;
1930
+ _dialogJumpSource ? . CancelAsync ( ) ;
1931
1931
1932
1932
// Create a new cancellation token source
1933
1933
_dialogJumpSource = new CancellationTokenSource ( ) ;
0 commit comments