diff --git a/osu.Game/Online/Leaderboards/Leaderboard.cs b/osu.Game/Online/Leaderboards/Leaderboard.cs
index 38df0efd6f..f5b6e185c7 100644
--- a/osu.Game/Online/Leaderboards/Leaderboard.cs
+++ b/osu.Game/Online/Leaderboards/Leaderboard.cs
@@ -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
});
}
+ ///
+ /// Performs a fetch/refresh of scores to be displayed.
+ ///
+ /// A callback which should be called when fetching is completed. Scheduling is not required.
+ /// An responsible for the fetch operation. This will be queued and performed automatically.
protected abstract APIRequest FetchScores(Action> scoresCallback);
private Placeholder currentPlaceholder;