mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Remove extra unneded safety
This commit is contained in:
parent
b9220a1e29
commit
9af6ef1864
@ -255,23 +255,15 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
PlaceholderState = PlaceholderState.Retrieving;
|
||||
loading.Show();
|
||||
|
||||
var localBeatmap = Beatmap;
|
||||
|
||||
getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value ?? Beatmap.Ruleset, Scope);
|
||||
getScoresRequest.Success += r => Schedule(() =>
|
||||
{
|
||||
if (localBeatmap != Beatmap)
|
||||
return;
|
||||
|
||||
Scores = r.Scores;
|
||||
PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores;
|
||||
});
|
||||
|
||||
getScoresRequest.Failure += e => Schedule(() =>
|
||||
{
|
||||
if (localBeatmap != Beatmap)
|
||||
return;
|
||||
|
||||
if (e is OperationCanceledException)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user