1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 08:27:49 +08:00

Merge pull request #10104 from smoogipoo/leaderboard-loading-spinner-fix

Fix leaderboard loading spinner disappearing too early
This commit is contained in:
Dean Herbert 2020-09-09 22:49:27 +09:00 committed by GitHub
commit aa2be09d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,13 +56,14 @@ namespace osu.Game.Online.Leaderboards
scrollFlow?.FadeOut(fade_duration, Easing.OutQuint).Expire();
scrollFlow = null;
loading.Hide();
showScoresDelegate?.Cancel();
showScoresCancellationSource?.Cancel();
if (scores == null || !scores.Any())
{
loading.Hide();
return;
}
// ensure placeholder is hidden when displaying scores
PlaceholderState = PlaceholderState.Successful;
@ -84,6 +85,7 @@ namespace osu.Game.Online.Leaderboards
}
scrollContainer.ScrollTo(0f, false);
loading.Hide();
}, (showScoresCancellationSource = new CancellationTokenSource()).Token));
}
}