1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Update usage of requests

This commit is contained in:
Andrei Zavatski 2019-07-15 13:37:25 +03:00
parent 111541fe7a
commit 9458bca58f
5 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ namespace osu.Game.Online.API.Requests
this.userId = userId;
this.type = type;
this.offset = offset;
this.offset = limit;
this.limit = limit;
}
// ReSharper disable once ImpureMethodCallOnReadonlyValueField

View File

@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
protected override void ShowMore()
{
request = new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
request = new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage, ItemsPerPage);
request.Success += sets => Schedule(() =>
{
MoreButton.FadeTo(sets.Count == ItemsPerPage ? 1 : 0);

View File

@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
protected override void ShowMore()
{
request = new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++ * ItemsPerPage);
request = new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++ * ItemsPerPage, ItemsPerPage);
request.Success += beatmaps => Schedule(() =>
{
MoreButton.FadeTo(beatmaps.Count == ItemsPerPage ? 1 : 0);

View File

@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
protected override void ShowMore()
{
request = new GetUserScoresRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
request = new GetUserScoresRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage, ItemsPerPage);
request.Success += scores => Schedule(() =>
{
foreach (var s in scores)

View File

@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
protected override void ShowMore()
{
request = new GetUserRecentActivitiesRequest(User.Value.Id, VisiblePages++ * ItemsPerPage);
request = new GetUserRecentActivitiesRequest(User.Value.Id, VisiblePages++ * ItemsPerPage, ItemsPerPage);
request.Success += activities => Schedule(() =>
{
MoreButton.FadeTo(activities.Count == ItemsPerPage ? 1 : 0);