Reduce isLoading calls

This commit is contained in:
EVAST9919
2017-11-13 18:49:10 +03:00
parent d157e6baf1
commit fa6d3f9792
2 changed files with 7 additions and 10 deletions

View File

@ -92,8 +92,6 @@ namespace osu.Game.Overlays
private void updateScores(BeatmapInfo beatmap)
{
scores.IsLoading = true;
getScoresRequest?.Cancel();
if (!beatmap.OnlineBeatmapID.HasValue)
@ -102,9 +100,14 @@ namespace osu.Game.Overlays
return;
}
getScoresRequest = new GetScoresRequest(beatmap);
getScoresRequest.Success += r => scores.Scores = r.Scores;
scores.IsLoading = true;
getScoresRequest = new GetScoresRequest(beatmap);
getScoresRequest.Success += r =>
{
scores.Scores = r.Scores;
scores.IsLoading = false;
};
api.Queue(getScoresRequest);
}