mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 16:32:54 +08:00
Cancel more liberally
This commit is contained in:
parent
d602aebebb
commit
cc7089c3f4
@ -121,6 +121,8 @@ namespace osu.Game.Overlays
|
||||
|
||||
private CancellationTokenSource cancellationToken;
|
||||
|
||||
private Task panelLoadTask;
|
||||
|
||||
private void onSearchStarted()
|
||||
{
|
||||
cancellationToken?.Cancel();
|
||||
@ -131,10 +133,10 @@ namespace osu.Game.Overlays
|
||||
Loading.Show();
|
||||
}
|
||||
|
||||
private Task panelLoadTask;
|
||||
|
||||
private void onSearchFinished(BeatmapListingFilterControl.SearchResult searchResult)
|
||||
{
|
||||
cancellationToken?.Cancel();
|
||||
|
||||
if (searchResult.Type == BeatmapListingFilterControl.SearchResultType.SupporterOnlyFilters)
|
||||
{
|
||||
supporterRequiredContent.UpdateText(searchResult.SupporterOnlyFiltersUsed);
|
||||
@ -239,6 +241,8 @@ namespace osu.Game.Overlays
|
||||
|
||||
var newCards = createCardsFor(foundContent.Reverse().Select(card => card.BeatmapSet));
|
||||
|
||||
cancellationToken?.Cancel();
|
||||
|
||||
panelLoadTask = LoadComponentsAsync(newCards, cards =>
|
||||
{
|
||||
foundContent.Clear();
|
||||
|
Loading…
Reference in New Issue
Block a user