2019-08-09 16:14:38 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Online.API.Requests;
|
|
|
|
|
using osu.Framework.Bindables;
|
2019-08-23 19:11:21 +08:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
|
|
|
|
using osu.Game.Online.API;
|
|
|
|
|
using System.Collections.Generic;
|
2021-07-17 23:36:49 +08:00
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2021-11-04 17:02:44 +08:00
|
|
|
|
using APIUser = osu.Game.Online.API.Requests.Responses.APIUser;
|
2019-08-09 16:14:38 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
|
|
|
|
{
|
2020-11-21 08:18:24 +08:00
|
|
|
|
public class PaginatedKudosuHistoryContainer : PaginatedProfileSubsection<APIKudosuHistory>
|
2019-08-09 16:14:38 +08:00
|
|
|
|
{
|
2021-11-04 17:02:44 +08:00
|
|
|
|
public PaginatedKudosuHistoryContainer(Bindable<APIUser> user)
|
2021-07-17 23:36:49 +08:00
|
|
|
|
: base(user, missingText: UsersStrings.ShowExtraKudosuEntryEmpty)
|
2019-08-09 16:14:38 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-19 04:04:21 +08:00
|
|
|
|
protected override APIRequest<List<APIKudosuHistory>> CreateRequest(int itemsPerPage, int initialItems)
|
|
|
|
|
=> new GetUserKudosuHistoryRequest(User.Value.Id, VisiblePages++, itemsPerPage, initialItems);
|
2019-08-09 16:14:38 +08:00
|
|
|
|
|
2019-08-23 19:11:21 +08:00
|
|
|
|
protected override Drawable CreateDrawableItem(APIKudosuHistory item) => new DrawableKudosuHistoryItem(item);
|
2019-08-09 16:14:38 +08:00
|
|
|
|
}
|
|
|
|
|
}
|