1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 22:22:55 +08:00
osu-lazer/osu.Game/Overlays/Profile/Sections/Recent/PaginatedRecentActivityContainer.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.3 KiB
C#
Raw Normal View History

// 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
2022-06-17 15:37:17 +08:00
#nullable disable
using osu.Framework.Graphics;
2018-02-25 21:48:39 +08:00
using osu.Game.Online.API.Requests;
2019-02-21 18:04:31 +08:00
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;
2021-07-17 21:50:56 +08:00
using osu.Game.Resources.Localisation.Web;
using APIUser = osu.Game.Online.API.Requests.Responses.APIUser;
2018-04-13 17:19:50 +08:00
2018-02-26 03:46:46 +08:00
namespace osu.Game.Overlays.Profile.Sections.Recent
2018-02-25 21:48:39 +08:00
{
2020-11-21 08:18:24 +08:00
public class PaginatedRecentActivityContainer : PaginatedProfileSubsection<APIRecentActivity>
2018-02-25 21:48:39 +08:00
{
public PaginatedRecentActivityContainer(Bindable<APIUser> user)
2021-07-17 22:41:42 +08:00
: base(user, missingText: EventsStrings.Empty)
2018-02-25 21:48:39 +08:00
{
}
[BackgroundDependencyLoader]
private void load()
{
2020-01-30 18:55:50 +08:00
ItemsContainer.Spacing = new Vector2(0, 8);
2018-02-25 21:48:39 +08:00
}
2018-04-13 17:19:50 +08:00
2022-04-19 07:48:34 +08:00
protected override APIRequest<List<APIRecentActivity>> CreateRequest(PaginationParameters pagination) =>
new GetUserRecentActivitiesRequest(User.Value.Id, pagination);
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-02-25 21:48:39 +08:00
}
}