Do not show nomination info if hype info not present to match web

This commit is contained in:
Bartłomiej Dach 2021-11-07 21:20:21 +01:00
parent 1f405a7e71
commit 0e09edfce2
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
2 changed files with 8 additions and 1 deletions

View File

@ -55,6 +55,11 @@ namespace osu.Game.Tests.Visual.Beatmaps
someDifficulties.Status = BeatmapSetOnlineStatus.Qualified;
someDifficulties.HasFavourited = true;
someDifficulties.FavouriteCount = 1;
someDifficulties.NominationStatus = new BeatmapSetNominationStatus
{
Current = 2,
Required = 2
};
var manyDifficulties = getManyDifficultiesBeatmapSet(100);
manyDifficulties.Status = BeatmapSetOnlineStatus.Pending;

View File

@ -282,7 +282,9 @@ namespace osu.Game.Beatmaps.Drawables.Cards
if (beatmapSet.HypeStatus != null)
yield return new HypesStatistic(beatmapSet.HypeStatus);
if (beatmapSet.NominationStatus != null)
// web does not show nominations unless hypes are also present.
// see: https://github.com/ppy/osu-web/blob/8ed7d071fd1d3eaa7e43cf0e4ff55ca2fef9c07c/resources/assets/lib/beatmapset-panel.tsx#L443
if (beatmapSet.HypeStatus != null && beatmapSet.NominationStatus != null)
yield return new NominationsStatistic(beatmapSet.NominationStatus);
yield return new FavouritesStatistic(beatmapSet);