1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-28 09:37:23 +08:00

Simplify logic

This commit is contained in:
Dean Herbert 2019-07-20 22:50:17 +09:00
parent 2df279f902
commit 2a94b68ecb

View File

@ -127,19 +127,15 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private void getScores(BeatmapInfo beatmap) private void getScores(BeatmapInfo beatmap)
{ {
loadingAnimation.Show();
getScoresRequest?.Cancel(); getScoresRequest?.Cancel();
getScoresRequest = null; getScoresRequest = null;
Scores = null; Scores = null;
if (beatmap?.OnlineBeatmapID.HasValue != true) if (beatmap?.OnlineBeatmapID.HasValue != true)
{
loadingAnimation.Hide();
return; return;
}
loadingAnimation.Show();
getScoresRequest = new GetScoresRequest(beatmap, beatmap.Ruleset); getScoresRequest = new GetScoresRequest(beatmap, beatmap.Ruleset);
getScoresRequest.Success += scores => getScoresRequest.Success += scores =>
{ {