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:
parent
111541fe7a
commit
9458bca58f
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user