1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

simplify beatmap metadata logic in DrawableProfileScore

This commit is contained in:
tsunyoku 2022-07-17 18:10:47 +01:00
parent 8791edf84c
commit a5d7075ef1

View File

@ -50,24 +50,6 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
[BackgroundDependencyLoader]
private void load(RulesetStore rulesets)
{
var beatmapSet = Score.BeatmapSet ?? Score.Beatmap?.BeatmapSet;
var beatmapInfo = new BeatmapInfo();
if (beatmapSet != null)
{
var beatmapMetadata = new BeatmapMetadata
{
Artist = beatmapSet.Artist,
ArtistUnicode = beatmapSet.ArtistUnicode,
Title = beatmapSet.Title,
TitleUnicode = beatmapSet.TitleUnicode,
};
beatmapInfo.Metadata = beatmapMetadata;
if (Score.Beatmap?.DifficultyName != null)
beatmapInfo.DifficultyName = Score.Beatmap.DifficultyName;
}
AddInternal(new ProfileItemContainer
{
Children = new Drawable[]
@ -102,7 +84,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Spacing = new Vector2(0, 2),
Children = new Drawable[]
{
new ScoreBeatmapMetadataContainer(beatmapInfo),
new ScoreBeatmapMetadataContainer(Score.Beatmap),
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,