mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Merge pull request #1829 from fangerm/supporter-leaderboards
Check for supporter before displaying leaderboard loading animation
This commit is contained in:
commit
131a431b02
@ -109,6 +109,13 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
{
|
{
|
||||||
if (value == placeholderState) return;
|
if (value == placeholderState) return;
|
||||||
|
|
||||||
|
if (value != PlaceholderState.Successful)
|
||||||
|
{
|
||||||
|
getScoresRequest?.Cancel();
|
||||||
|
getScoresRequest = null;
|
||||||
|
Scores = null;
|
||||||
|
}
|
||||||
|
|
||||||
switch (placeholderState = value)
|
switch (placeholderState = value)
|
||||||
{
|
{
|
||||||
case PlaceholderState.NetworkFailure:
|
case PlaceholderState.NetworkFailure:
|
||||||
@ -211,10 +218,6 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
private void updateScores()
|
private void updateScores()
|
||||||
{
|
{
|
||||||
getScoresRequest?.Cancel();
|
|
||||||
getScoresRequest = null;
|
|
||||||
Scores = null;
|
|
||||||
|
|
||||||
if (Scope == LeaderboardScope.Local)
|
if (Scope == LeaderboardScope.Local)
|
||||||
{
|
{
|
||||||
// TODO: get local scores from wherever here.
|
// TODO: get local scores from wherever here.
|
||||||
@ -234,16 +237,15 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaceholderState = PlaceholderState.Retrieving;
|
|
||||||
loading.Show();
|
|
||||||
|
|
||||||
if (Scope != LeaderboardScope.Global && !api.LocalUser.Value.IsSupporter)
|
if (Scope != LeaderboardScope.Global && !api.LocalUser.Value.IsSupporter)
|
||||||
{
|
{
|
||||||
loading.Hide();
|
|
||||||
PlaceholderState = PlaceholderState.NotSupporter;
|
PlaceholderState = PlaceholderState.NotSupporter;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PlaceholderState = PlaceholderState.Retrieving;
|
||||||
|
loading.Show();
|
||||||
|
|
||||||
getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value ?? Beatmap.Ruleset, Scope);
|
getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value ?? Beatmap.Ruleset, Scope);
|
||||||
getScoresRequest.Success += r =>
|
getScoresRequest.Success += r =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user