diff --git a/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs b/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs index c15a179e8c..ac47fade48 100644 --- a/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs +++ b/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs @@ -109,6 +109,13 @@ protected PlaceholderState PlaceholderState { if (value == placeholderState) return; + if (value != PlaceholderState.Successful) + { + getScoresRequest?.Cancel(); + getScoresRequest = null; + Scores = null; + } + switch (placeholderState = value) { case PlaceholderState.NetworkFailure: @@ -211,10 +218,6 @@ private void handleApiStateChange(APIState oldState, APIState newState) private void updateScores() { - getScoresRequest?.Cancel(); - getScoresRequest = null; - Scores = null; - if (Scope == LeaderboardScope.Local) { // TODO: get local scores from wherever here. @@ -234,16 +237,15 @@ private void updateScores() return; } - PlaceholderState = PlaceholderState.Retrieving; - loading.Show(); - if (Scope != LeaderboardScope.Global && !api.LocalUser.Value.IsSupporter) { - loading.Hide(); PlaceholderState = PlaceholderState.NotSupporter; return; } + PlaceholderState = PlaceholderState.Retrieving; + loading.Show(); + getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value ?? Beatmap.Ruleset, Scope); getScoresRequest.Success += r => {