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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user