1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00

Merge pull request #2924 from peppy/fix-leaderboard-placeholder

Fix leaderboard showing placeholder briefly when entering song select
This commit is contained in:
Dan Balasescu 2018-07-02 17:25:31 +09:00 committed by GitHub
commit 0123c76b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,8 @@ namespace osu.Game.Screens.Select.Leaderboards
private ScheduledDelegate showScoresDelegate;
private bool scoresLoadedOnce;
private IEnumerable<Score> scores;
public IEnumerable<Score> Scores
@ -49,6 +51,8 @@ namespace osu.Game.Screens.Select.Leaderboards
{
scores = value;
scoresLoadedOnce = true;
scrollFlow?.FadeOut(fade_duration, Easing.OutQuint).Expire();
scrollFlow = null;
@ -226,6 +230,10 @@ namespace osu.Game.Screens.Select.Leaderboards
private void updateScores()
{
// don't display any scores or placeholder until the first Scores_Set has been called.
// this avoids scope changes flickering a "no scores" placeholder before initialisation of song select is finished.
if (!scoresLoadedOnce) return;
getScoresRequest?.Cancel();
getScoresRequest = null;