1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix potentially triggering new requests too early

This commit is contained in:
smoogipoo 2020-07-31 21:33:04 +09:00
parent a4a4c87612
commit 17018ffa8b

View File

@ -190,8 +190,9 @@ namespace osu.Game.Screens.Ranking
if (nextPageRequest != null)
{
nextPageRequest.Success += () => nextPageRequest = null;
nextPageRequest.Failure += _ => nextPageRequest = null;
// Scheduled after children to give the list a chance to update its scroll position and not potentially trigger a second request too early.
nextPageRequest.Success += () => ScheduleAfterChildren(() => nextPageRequest = null);
nextPageRequest.Failure += _ => ScheduleAfterChildren(() => nextPageRequest = null);
api.Queue(nextPageRequest);
}