Track loading via state as well

This commit is contained in:
Dean Herbert
2022-01-31 01:12:03 +09:00
parent 1cec76df74
commit f8939af5e6
4 changed files with 48 additions and 43 deletions

View File

@ -101,7 +101,7 @@ namespace osu.Game.Screens.Select.Leaderboards
if (fetchBeatmapInfo == null)
{
SetErrorState(LeaderboardErrorState.NoneSelected);
SetErrorState(LeaderboardState.NoneSelected);
return null;
}
@ -113,19 +113,19 @@ namespace osu.Game.Screens.Select.Leaderboards
if (api?.IsLoggedIn != true)
{
SetErrorState(LeaderboardErrorState.NotLoggedIn);
SetErrorState(LeaderboardState.NotLoggedIn);
return null;
}
if (fetchBeatmapInfo.OnlineID <= 0 || fetchBeatmapInfo.Status <= BeatmapOnlineStatus.Pending)
{
SetErrorState(LeaderboardErrorState.Unavailable);
SetErrorState(LeaderboardState.Unavailable);
return null;
}
if (!api.LocalUser.Value.IsSupporter && (Scope != BeatmapLeaderboardScope.Global || filterMods))
{
SetErrorState(LeaderboardErrorState.NotSupporter);
SetErrorState(LeaderboardState.NotSupporter);
return null;
}