mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Fix leaderboard showing placeholder briefly when entering song select
This commit is contained in:
parent
109649aa52
commit
2c597874bf
@ -40,6 +40,8 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
|
||||
private ScheduledDelegate showScoresDelegate;
|
||||
|
||||
private bool scoresLoadedOnce;
|
||||
|
||||
private IEnumerable<Score> scores;
|
||||
public IEnumerable<Score> Scores
|
||||
{
|
||||
@ -48,6 +50,8 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
scores = value;
|
||||
|
||||
scoresLoadedOnce = true;
|
||||
|
||||
scrollFlow?.FadeOut(fade_duration, Easing.OutQuint).Expire();
|
||||
scrollFlow = null;
|
||||
|
||||
@ -227,6 +231,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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user