1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-05 01:04:16 +08:00

Show vote count in tag tooltip

This commit is contained in:
Dan Balasescu
2025-12-29 17:45:31 +09:00
Unverified
parent e34d266987
commit 2e324fe856
3 changed files with 5 additions and 5 deletions
@@ -117,7 +117,7 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"owners")]
public BeatmapOwner[] BeatmapOwners { get; set; } = Array.Empty<BeatmapOwner>();
public APITag[] GetTopUserTags()
public (APITag Tag, int VoteCount)[] GetTopUserTags()
{
if (TopTags == null || TopTags.Length == 0 || BeatmapSet?.RelatedTags == null)
return [];
@@ -130,7 +130,7 @@ namespace osu.Game.Online.API.Requests.Responses
// see https://github.com/ppy/osu-web/blob/bb3bd2e7c6f84f26066df5ea20a81c77ec9bb60a/resources/js/beatmapsets-show/controller.ts#L103-L106 for sort criteria
.OrderByDescending(t => t.topTag.VoteCount)
.ThenBy(t => t.relatedTag!.Name)
.Select(t => t.relatedTag!)
.Select(t => (t.relatedTag!, t.topTag.VoteCount))
.ToArray();
}