1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 17:13:20 +08:00
osu-lazer/osu.Game/Overlays/Profile/Sections/Recent/PaginatedRecentActivityContainer.cs
2023-01-09 17:37:28 +01:00

36 lines
1.3 KiB
C#

// 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;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.API;
using System.Collections.Generic;
using osuTK;
using osu.Framework.Allocation;
using osu.Game.Resources.Localisation.Web;
using APIUser = osu.Game.Online.API.Requests.Responses.APIUser;
namespace osu.Game.Overlays.Profile.Sections.Recent
{
public partial class PaginatedRecentActivityContainer : PaginatedProfileSubsection<APIRecentActivity>
{
public PaginatedRecentActivityContainer(Bindable<UserProfileData?> userProfile)
: base(userProfile, missingText: EventsStrings.Empty)
{
}
[BackgroundDependencyLoader]
private void load()
{
ItemsContainer.Spacing = new Vector2(0, 8);
}
protected override APIRequest<List<APIRecentActivity>> CreateRequest(APIUser user, PaginationParameters pagination) =>
new GetUserRecentActivitiesRequest(user.Id, pagination);
protected override Drawable CreateDrawableItem(APIRecentActivity model) => new DrawableRecentActivity(model);
}
}