Disallow setting "NoScores" externally as it is handled internally

This commit is contained in:
Dean Herbert
2022-01-30 16:16:33 +09:00
parent acc1199add
commit 04dbb5d3c6
2 changed files with 4 additions and 2 deletions

View File

@ -165,6 +165,7 @@ namespace osu.Game.Online.Leaderboards
{
switch (errorState)
{
case LeaderboardErrorState.NoScores:
case LeaderboardErrorState.NoError:
throw new InvalidOperationException($"State {errorState} cannot be set by a leaderboard implementation.");
}
@ -250,7 +251,7 @@ namespace osu.Game.Online.Leaderboards
if (scores?.Any() != true)
{
SetErrorState(LeaderboardErrorState.NoScores);
setErrorState(LeaderboardErrorState.NoScores);
loading.Hide();
return;
}