mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +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;
|
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
|
replacePlaceholder(new RetrievalFailurePlaceholder
|
||||||
{
|
{
|
||||||
@ -202,20 +215,6 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
loading.Show();
|
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)
|
if (Scope != LeaderboardScope.Global && !api.LocalUser.Value.IsSupporter)
|
||||||
{
|
{
|
||||||
loading.Hide();
|
loading.Hide();
|
||||||
|
Reference in New Issue
Block a user