mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Cancel more liberally
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user