Skip to content

Commit

Permalink
Fixed: Edge Case where Cancelled Search Operation Still Completes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Aug 3, 2022
1 parent 4623941 commit eacc569
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public async Task GetSearchResults()
_tokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));

var searchTuples = await CurrentPackageProvider.SearchAsync(SearchQuery, _paginationHelper.Skip, _paginationHelper.Take, _tokenSource.Token);
Collections.ModifyObservableCollection(SearchResult, searchTuples);
if (!_tokenSource.IsCancellationRequested)
Collections.ModifyObservableCollection(SearchResult, searchTuples);
}

/// <summary>
Expand Down

0 comments on commit eacc569

Please sign in to comment.