Simplify conditions

This commit is contained in:
Dean Herbert 2019-07-07 13:21:41 +09:00
parent 1eec69c6b6
commit ebc0e50295
1 changed files with 1 additions and 11 deletions

View File

@ -111,22 +111,12 @@ protected override APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresC
return null;
}
if (Beatmap?.OnlineBeatmapID == null)
if (Beatmap?.OnlineBeatmapID == null || Beatmap?.Status <= BeatmapSetOnlineStatus.Pending)
{
PlaceholderState = PlaceholderState.Unavailable;
return null;
}
switch (Beatmap?.Status)
{
case BeatmapSetOnlineStatus.Graveyard:
case BeatmapSetOnlineStatus.None:
case BeatmapSetOnlineStatus.Pending:
case BeatmapSetOnlineStatus.WIP:
PlaceholderState = PlaceholderState.Unavailable;
return null;
}
if (!api.LocalUser.Value.IsSupporter && (Scope != BeatmapLeaderboardScope.Global || filterMods))
{
PlaceholderState = PlaceholderState.NotSupporter;