mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00:00
Disallow setting "NoScores" externally as it is handled internally
This commit is contained in:
parent
acc1199add
commit
04dbb5d3c6
@ -114,7 +114,8 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
[Test]
|
||||
public void TestPlaceholderStates()
|
||||
{
|
||||
AddStep(@"Empty Scores", () => leaderboard.SetErrorState(LeaderboardErrorState.NoScores));
|
||||
AddStep("ensure no scores displayed", () => leaderboard.SetScores(null));
|
||||
|
||||
AddStep(@"Network failure", () => leaderboard.SetErrorState(LeaderboardErrorState.NetworkFailure));
|
||||
AddStep(@"No supporter", () => leaderboard.SetErrorState(LeaderboardErrorState.NotSupporter));
|
||||
AddStep(@"Not logged in", () => leaderboard.SetErrorState(LeaderboardErrorState.NotLoggedIn));
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user