Skip to content

Commit 1ffbbca

Browse files
committed
Remove _updateToken
1 parent a143cb4 commit 1ffbbca

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public partial class MainViewModel : BaseModel, ISavable, IDisposable
4444
private readonly TopMostRecord _topMostRecord;
4545

4646
private CancellationTokenSource _updateSource; // Used to cancel old query flows
47-
private CancellationToken _updateToken;
4847
private readonly SemaphoreSlim _updateLock = new(1, 1); // Used to ensure one updating flow
4948

5049
private ChannelWriter<ResultsForUpdate> _resultsUpdateChannelWriter;
@@ -245,7 +244,7 @@ public void RegisterResultsUpdatedEvent()
245244
return;
246245
}
247246

248-
var token = e.Token == default ? _updateToken : e.Token;
247+
var token = e.Token == default ? _updateSource.Token : e.Token;
249248

250249
// make a clone to avoid possible issue that plugin will also change the list and items when updating view model
251250
var resultsCopy = DeepCloneResults(e.Results, token);
@@ -1269,7 +1268,6 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
12691268
}
12701269

12711270
_updateSource = new CancellationTokenSource();
1272-
_updateToken = _updateSource.Token;
12731271

12741272
ProgressBarVisibility = Visibility.Hidden;
12751273

0 commit comments

Comments
 (0)