1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 04:52:57 +08:00

Merge pull request #13959 from smoogipoo/fix-beatmaplisting-null-cursor

Fix beatmap listing continually paginating when no more beatmaps are available
This commit is contained in:
Dean Herbert 2021-07-21 19:55:40 +09:00 committed by GitHub
commit fe9e72d767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,7 +208,8 @@ namespace osu.Game.Overlays.BeatmapListing
{
var sets = response.BeatmapSets.Select(responseJson => responseJson.ToBeatmapSet(rulesets)).ToList();
if (sets.Count == 0)
// If the previous request returned a null cursor, the API is indicating we can't paginate further (maybe there are no more beatmaps left).
if (sets.Count == 0 || response.Cursor == null)
noMoreResults = true;
if (CurrentPage == 0)