mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 09:22:54 +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;
|
PlaceholderState = PlaceholderState.Retrieving;
|
||||||
loading.Show();
|
loading.Show();
|
||||||
|
|
||||||
var localBeatmap = Beatmap;
|
|
||||||
|
|
||||||
getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value ?? Beatmap.Ruleset, Scope);
|
getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value ?? Beatmap.Ruleset, Scope);
|
||||||
getScoresRequest.Success += r => Schedule(() =>
|
getScoresRequest.Success += r => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (localBeatmap != Beatmap)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Scores = r.Scores;
|
Scores = r.Scores;
|
||||||
PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores;
|
PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores;
|
||||||
});
|
});
|
||||||
|
|
||||||
getScoresRequest.Failure += e => Schedule(() =>
|
getScoresRequest.Failure += e => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (localBeatmap != Beatmap)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (e is OperationCanceledException)
|
if (e is OperationCanceledException)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user