2019-01-24 16:43:03 +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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Online.API.Requests;
|
|
|
|
|
using osu.Game.Users;
|
2019-02-21 18:04:31 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
2018-06-08 10:41:54 +08:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2019-08-27 20:47:37 +08:00
|
|
|
|
using osu.Game.Online.API;
|
|
|
|
|
using System.Collections.Generic;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Profile.Sections.Recent
|
|
|
|
|
{
|
2019-08-27 20:47:37 +08:00
|
|
|
|
public class PaginatedRecentActivityContainer : PaginatedContainer<APIRecentActivity>
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
public PaginatedRecentActivityContainer(Bindable<User> user, string header, string missing)
|
|
|
|
|
: base(user, header, missing)
|
|
|
|
|
{
|
|
|
|
|
ItemsPerPage = 5;
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-27 20:47:37 +08:00
|
|
|
|
protected override APIRequest<List<APIRecentActivity>> CreateRequest() =>
|
|
|
|
|
new GetUserRecentActivitiesRequest(User.Value.Id, VisiblePages++, ItemsPerPage);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2019-08-28 12:31:12 +08:00
|
|
|
|
protected override Drawable CreateDrawableItem(APIRecentActivity model) => new DrawableRecentActivity(model);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|