Merge remote-tracking branch 'upstream/master' into disable-unimplemented-mods

This commit is contained in:
Dean Herbert 2018-01-02 16:58:28 +09:00
commit 1c3541f18e
1 changed files with 10 additions and 8 deletions

View File

@ -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 =>
{