mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Pagination
-> `PaginationParameters
This commit is contained in:
@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
||||
}
|
||||
}
|
||||
|
||||
protected override APIRequest<List<APIBeatmapSet>> CreateRequest(Pagination pagination) =>
|
||||
protected override APIRequest<List<APIBeatmapSet>> CreateRequest(PaginationParameters pagination) =>
|
||||
new GetUserBeatmapsRequest(User.Value.Id, type, pagination);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIBeatmapSet model) => model.OnlineID > 0
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
|
||||
protected override int GetCount(APIUser user) => user.BeatmapPlayCountsCount;
|
||||
|
||||
protected override APIRequest<List<APIUserMostPlayedBeatmap>> CreateRequest(Pagination pagination) =>
|
||||
protected override APIRequest<List<APIUserMostPlayedBeatmap>> CreateRequest(PaginationParameters pagination) =>
|
||||
new GetUserMostPlayedBeatmapsRequest(User.Value.Id, pagination);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIUserMostPlayedBeatmap mostPlayed) =>
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
{
|
||||
}
|
||||
|
||||
protected override APIRequest<List<APIKudosuHistory>> CreateRequest(Pagination pagination)
|
||||
protected override APIRequest<List<APIKudosuHistory>> CreateRequest(PaginationParameters pagination)
|
||||
=> new GetUserKudosuHistoryRequest(User.Value.Id, pagination);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIKudosuHistory item) => new DrawableKudosuHistoryItem(item);
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
protected Pagination? CurrentPage { get; private set; }
|
||||
protected PaginationParameters? CurrentPage { get; private set; }
|
||||
|
||||
protected ReverseChildIDFillFlowContainer<Drawable> ItemsContainer { get; private set; }
|
||||
|
||||
@ -111,7 +111,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
{
|
||||
loadCancellation = new CancellationTokenSource();
|
||||
|
||||
CurrentPage = CurrentPage?.TakeNext(ItemsPerPage) ?? new Pagination(InitialItemsCount);
|
||||
CurrentPage = CurrentPage?.TakeNext(ItemsPerPage) ?? new PaginationParameters(InitialItemsCount);
|
||||
|
||||
retrievalRequest = CreateRequest(CurrentPage.Value);
|
||||
retrievalRequest.Success += UpdateItems;
|
||||
@ -151,7 +151,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
{
|
||||
}
|
||||
|
||||
protected abstract APIRequest<List<TModel>> CreateRequest(Pagination pagination);
|
||||
protected abstract APIRequest<List<TModel>> CreateRequest(PaginationParameters pagination);
|
||||
|
||||
protected abstract Drawable CreateDrawableItem(TModel model);
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
base.OnItemsReceived(items);
|
||||
}
|
||||
|
||||
protected override APIRequest<List<APIScore>> CreateRequest(Pagination pagination) =>
|
||||
protected override APIRequest<List<APIScore>> CreateRequest(PaginationParameters pagination) =>
|
||||
new GetUserScoresRequest(User.Value.Id, type, pagination);
|
||||
|
||||
private int drawableItemIndex;
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
||||
ItemsContainer.Spacing = new Vector2(0, 8);
|
||||
}
|
||||
|
||||
protected override APIRequest<List<APIRecentActivity>> CreateRequest(Pagination pagination) =>
|
||||
protected override APIRequest<List<APIRecentActivity>> CreateRequest(PaginationParameters pagination) =>
|
||||
new GetUserRecentActivitiesRequest(User.Value.Id, pagination);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIRecentActivity model) => new DrawableRecentActivity(model);
|
||||
|
Reference in New Issue
Block a user