mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 23:57:22 +08: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 = Schedule(() =>
|
||||
{
|
||||
if (api?.IsLoggedIn != true)
|
||||
{
|
||||
PlaceholderState = PlaceholderState.NotLoggedIn;
|
||||
return;
|
||||
}
|
||||
|
||||
PlaceholderState = PlaceholderState.Retrieving;
|
||||
loading.Show();
|
||||
|
||||
@ -231,6 +225,12 @@ namespace osu.Game.Online.Leaderboards
|
||||
if (getScoresRequest == null)
|
||||
return;
|
||||
|
||||
if (api?.IsLoggedIn != true)
|
||||
{
|
||||
PlaceholderState = PlaceholderState.NotLoggedIn;
|
||||
return;
|
||||
}
|
||||
|
||||
getScoresRequest.Failure += e => Schedule(() =>
|
||||
{
|
||||
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);
|
||||
|
||||
private Placeholder currentPlaceholder;
|
||||
|
Loading…
x
Reference in New Issue
Block a user