Merge pull request #10800 from EVAST9919/profile-most-played-count

This commit is contained in:
Dean Herbert 2020-11-12 09:59:02 +09:00 committed by GitHub
commit ffad1b3d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 @@ private void load()
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 @@ public class UserCover
[JsonProperty(@"scores_first_count")]
public int ScoresFirstCount;
[JsonProperty(@"beatmap_playcounts_count")]
public int BeatmapPlaycountsCount;
[JsonProperty]
private string[] playstyle
{