1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:43:20 +08:00

Remove pointless level of schedule/cancel logic

This commit is contained in:
Dean Herbert 2022-01-28 21:47:28 +09:00
parent 64925b3fea
commit 17aa9f3040

View File

@ -54,8 +54,6 @@ namespace osu.Game.Online.Leaderboards
[Resolved(CanBeNull = true)]
private IAPIProvider api { get; set; }
private ScheduledDelegate pendingUpdateScores;
private readonly IBindable<APIState> apiState = new Bindable<APIState>();
private ICollection<TScoreInfo> scores;
@ -248,7 +246,6 @@ namespace osu.Game.Online.Leaderboards
protected virtual void Reset()
{
cancelPendingWork();
Scores = null;
}
@ -286,8 +283,6 @@ namespace osu.Game.Online.Leaderboards
cancelPendingWork();
pendingUpdateScores = Schedule(() =>
{
PlaceholderState = PlaceholderState.Retrieving;
loading.Show();
@ -309,7 +304,6 @@ namespace osu.Game.Online.Leaderboards
});
api?.Queue(getScoresRequest);
});
}
private void cancelPendingWork()
@ -319,9 +313,6 @@ namespace osu.Game.Online.Leaderboards
getScoresRequestCallback?.Cancel();
getScoresRequestCallback = null;
pendingUpdateScores?.Cancel();
pendingUpdateScores = null;
}
/// <summary>