mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Reorder API / logged in checks to make more sense
This commit is contained in:
@ -191,7 +191,20 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
|
||||
Scores = null;
|
||||
|
||||
if (api == null || Beatmap?.OnlineBeatmapID == null)
|
||||
if (Scope == LeaderboardScope.Local)
|
||||
{
|
||||
// TODO: get local scores from wherever here.
|
||||
Scores = Enumerable.Empty<Score>();
|
||||
return;
|
||||
}
|
||||
|
||||
if (api?.IsLoggedIn != true)
|
||||
{
|
||||
replacePlaceholder(new MessagePlaceholder(@"Please login to view online leaderboards!"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Beatmap?.OnlineBeatmapID == null)
|
||||
{
|
||||
replacePlaceholder(new RetrievalFailurePlaceholder
|
||||
{
|
||||
@ -202,20 +215,6 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
|
||||
loading.Show();
|
||||
|
||||
if (Scope == LeaderboardScope.Local)
|
||||
{
|
||||
// TODO: get local scores from wherever here.
|
||||
Scores = Enumerable.Empty<Score>();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!api.IsLoggedIn)
|
||||
{
|
||||
loading.Hide();
|
||||
replacePlaceholder(new MessagePlaceholder(@"Please login to view online leaderboards!"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Scope != LeaderboardScope.Global && !api.LocalUser.Value.IsSupporter)
|
||||
{
|
||||
loading.Hide();
|
||||
|
Reference in New Issue
Block a user