mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:03:13 +08:00
Add schedule and cancellation check to score ordering step
This commit is contained in:
parent
610eb9f6a4
commit
9c9fda84f3
@ -201,10 +201,13 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
scores = scores.Detach();
|
||||
|
||||
scoreManager.OrderByTotalScoreAsync(scores.ToArray(), cancellationToken)
|
||||
.ContinueWith(ordered =>
|
||||
.ContinueWith(ordered => Schedule(() =>
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
SetScores(ordered.GetResultSafely());
|
||||
}, TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||
}), TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user