mirror of
https://github.com/osukey/osukey.git
synced 2025-05-11 08:37:34 +09:00
Merge pull request #4412 from LeNitrous/local-leaderboard-display
Fix local leaderboard not displaying when logged out
This commit is contained in:
commit
cc855a8dcc
@ -213,12 +213,6 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
pendingUpdateScores?.Cancel();
|
pendingUpdateScores?.Cancel();
|
||||||
pendingUpdateScores = Schedule(() =>
|
pendingUpdateScores = Schedule(() =>
|
||||||
{
|
{
|
||||||
if (api?.IsLoggedIn != true)
|
|
||||||
{
|
|
||||||
PlaceholderState = PlaceholderState.NotLoggedIn;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
PlaceholderState = PlaceholderState.Retrieving;
|
PlaceholderState = PlaceholderState.Retrieving;
|
||||||
loading.Show();
|
loading.Show();
|
||||||
|
|
||||||
@ -231,6 +225,12 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
if (getScoresRequest == null)
|
if (getScoresRequest == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (api?.IsLoggedIn != true)
|
||||||
|
{
|
||||||
|
PlaceholderState = PlaceholderState.NotLoggedIn;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getScoresRequest.Failure += e => Schedule(() =>
|
getScoresRequest.Failure += e => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (e is OperationCanceledException)
|
if (e is OperationCanceledException)
|
||||||
@ -243,6 +243,11 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Performs a fetch/refresh of scores to be displayed.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="scoresCallback">A callback which should be called when fetching is completed. Scheduling is not required.</param>
|
||||||
|
/// <returns>An <see cref="APIRequest"/> responsible for the fetch operation. This will be queued and performed automatically.</returns>
|
||||||
protected abstract APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresCallback);
|
protected abstract APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresCallback);
|
||||||
|
|
||||||
private Placeholder currentPlaceholder;
|
private Placeholder currentPlaceholder;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user