1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 05:09:54 +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
Unverified
parent ef5e3d5ab8
commit f753f138c6
2 changed files with 6 additions and 1 deletions
@@ -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);
+3
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
{