mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Move cancellation to safer place
This commit is contained in:
parent
d72412d24d
commit
8eedef3e86
@ -51,6 +51,10 @@ namespace osu.Game.Online.Leaderboards
|
||||
|
||||
loading.Hide();
|
||||
|
||||
// schedule because we may not be loaded yet (LoadComponentAsync complains).
|
||||
showScoresDelegate?.Cancel();
|
||||
showScoresCancellationSource?.Cancel();
|
||||
|
||||
if (scores == null || !scores.Any())
|
||||
return;
|
||||
|
||||
@ -60,10 +64,6 @@ namespace osu.Game.Online.Leaderboards
|
||||
scrollFlow = CreateScoreFlow();
|
||||
scrollFlow.ChildrenEnumerable = scores.Select((s, index) => CreateDrawableScore(s, index + 1));
|
||||
|
||||
// schedule because we may not be loaded yet (LoadComponentAsync complains).
|
||||
showScoresDelegate?.Cancel();
|
||||
showScoresCancellationSource?.Cancel();
|
||||
|
||||
if (!IsLoaded)
|
||||
showScoresDelegate = Schedule(showScores);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user