Update paginated profile subsections to display items inline with web

This commit is contained in:
Salman Ahmed
2022-04-18 23:04:21 +03:00
parent 9d59cd408f
commit f08449e432
6 changed files with 27 additions and 20 deletions

View File

@ -20,11 +20,12 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
private const float panel_padding = 10f;
private readonly BeatmapSetType type;
protected override int InitialItemsCount => type == BeatmapSetType.Graveyard ? 2 : 6;
public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<APIUser> user, LocalisableString headerText)
: base(user, headerText)
{
this.type = type;
ItemsPerPage = 6;
}
[BackgroundDependencyLoader]
@ -57,8 +58,8 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
}
}
protected override APIRequest<List<APIBeatmapSet>> CreateRequest() =>
new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
protected override APIRequest<List<APIBeatmapSet>> CreateRequest(int itemsPerPage, int initialItems) =>
new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++, itemsPerPage, initialItems);
protected override Drawable CreateDrawableItem(APIBeatmapSet model) => model.OnlineID > 0
? new BeatmapCardNormal(model)