1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Add counter to most played beatmaps section in user overlay

This commit is contained in:
Andrei Zavatski 2020-11-12 03:11:29 +03:00 committed by smoogipoo
parent 8a2addbf3d
commit 7177dd5d82
2 changed files with 6 additions and 1 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
public class PaginatedMostPlayedBeatmapContainer : PaginatedContainer<APIUserMostPlayedBeatmap>
{
public PaginatedMostPlayedBeatmapContainer(Bindable<User> user)
: base(user, "Most Played Beatmaps", "No records. :(")
: base(user, "Most Played Beatmaps", "No records. :(", CounterVisibilityState.AlwaysVisible)
{
ItemsPerPage = 5;
}
@ -27,6 +27,8 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
ItemsContainer.Direction = FillDirection.Vertical;
}
protected override int GetCount(User user) => user.BeatmapPlaycountsCount;
protected override APIRequest<List<APIUserMostPlayedBeatmap>> CreateRequest() =>
new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++, ItemsPerPage);

View File

@ -144,6 +144,9 @@ namespace osu.Game.Users
[JsonProperty(@"scores_first_count")]
public int ScoresFirstCount;
[JsonProperty(@"beatmap_playcounts_count")]
public int BeatmapPlaycountsCount;
[JsonProperty]
private string[] playstyle
{