mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00:00
Add comments count to user profile overlay
This commit is contained in:
parent
ee7370b21a
commit
e31d583a7f
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
@ -115,6 +116,11 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
topLinkContainer.AddText("Contributed ");
|
||||
topLinkContainer.AddLink($@"{user.PostCount:#,##0} forum posts", $"{api.WebsiteRootUrl}/users/{user.Id}/posts", creationParameters: embolden);
|
||||
|
||||
addSpacer(topLinkContainer);
|
||||
|
||||
topLinkContainer.AddText("Posted ");
|
||||
topLinkContainer.AddLink("comment".ToQuantity(user.CommentsCount, "#,##0"), $"{api.WebsiteRootUrl}/comments?user_id={user.Id}", creationParameters: embolden);
|
||||
|
||||
string websiteWithoutProtocol = user.Website;
|
||||
|
||||
if (!string.IsNullOrEmpty(websiteWithoutProtocol))
|
||||
|
@ -120,6 +120,9 @@ namespace osu.Game.Users
|
||||
[JsonProperty(@"post_count")]
|
||||
public int PostCount;
|
||||
|
||||
[JsonProperty(@"comments_count")]
|
||||
public int CommentsCount;
|
||||
|
||||
[JsonProperty(@"follower_count")]
|
||||
public int FollowerCount;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user