Fix beatmap set overlay not showing user tags at all

Regressed in 60d9c358b8.

In general an `APIBeatmap`'s `BeatmapSet` need not be present. In the
usage site of `osu.Game.Overlays.BeatmapSet.Info`, `Beatmap` and
`BeatmapSet` were actually two separate bindables. Moving the logic to a
helper, and therefore implicitly moving `BeatmapSet` from tracking said
separate bindable to instead refer to `Beatmap.BeatmapSet` broke this.
This commit is contained in:
Bartłomiej Dach
2026-03-03 12:41:40 +01:00
committed by LA
parent 9895e345ed
commit 5fa2fc49ca

View File

@@ -242,12 +242,14 @@ namespace osu.Game.Overlays.BeatmapSet
BeatmapSet.BindValueChanged(setInfo =>
{
Picker.BeatmapSet = rulesetSelector.BeatmapSet = author.BeatmapSet = beatmapAvailability.BeatmapSet = Details.BeatmapSet = setInfo.NewValue;
cover.OnlineInfo = setInfo.NewValue;
var newBeatmapSet = setInfo.NewValue;
Picker.BeatmapSet = rulesetSelector.BeatmapSet = author.BeatmapSet = beatmapAvailability.BeatmapSet = Details.BeatmapSet = newBeatmapSet;
cover.OnlineInfo = newBeatmapSet;
downloadTracker?.RemoveAndDisposeImmediately();
if (setInfo.NewValue == null)
if (newBeatmapSet == null)
{
onlineStatusPill.FadeTo(0.5f, 500, Easing.OutQuint);
videoIconPill.Hide();
@@ -261,7 +263,10 @@ namespace osu.Game.Overlays.BeatmapSet
}
else
{
downloadTracker = new BeatmapDownloadTracker(setInfo.NewValue);
foreach (var beatmap in newBeatmapSet.Beatmaps)
beatmap.BeatmapSet = newBeatmapSet;
downloadTracker = new BeatmapDownloadTracker(newBeatmapSet);
downloadTracker.State.BindValueChanged(_ => updateDownloadButtons());
AddInternal(downloadTracker);
@@ -269,18 +274,18 @@ namespace osu.Game.Overlays.BeatmapSet
loading.Hide();
if (setInfo.NewValue.HasVideo)
if (newBeatmapSet.HasVideo)
videoIconPill.Show();
else
videoIconPill.Hide();
if (setInfo.NewValue.HasStoryboard)
if (newBeatmapSet.HasStoryboard)
storyboardIconPill.Show();
else
storyboardIconPill.Hide();
var titleText = new RomanisableString(setInfo.NewValue.TitleUnicode, setInfo.NewValue.Title);
var artistText = new RomanisableString(setInfo.NewValue.ArtistUnicode, setInfo.NewValue.Artist);
var titleText = new RomanisableString(newBeatmapSet.TitleUnicode, newBeatmapSet.Title);
var artistText = new RomanisableString(newBeatmapSet.ArtistUnicode, newBeatmapSet.Artist);
title.Clear();
artist.Clear();
@@ -290,13 +295,13 @@ namespace osu.Game.Overlays.BeatmapSet
title.AddArbitraryDrawable(Empty().With(d => d.Width = 5));
title.AddArbitraryDrawable(externalLink = new ExternalLinkButton());
if (setInfo.NewValue.HasExplicitContent)
if (newBeatmapSet.HasExplicitContent)
{
title.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
title.AddArbitraryDrawable(new ExplicitContentBeatmapBadge());
}
if (setInfo.NewValue.FeaturedInSpotlight)
if (newBeatmapSet.FeaturedInSpotlight)
{
title.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
title.AddArbitraryDrawable(new SpotlightBeatmapBadge());
@@ -304,7 +309,7 @@ namespace osu.Game.Overlays.BeatmapSet
artist.AddLink(artistText, LinkAction.SearchBeatmapSet, LocalisableString.Interpolate($@"artist=""""{artistText}"""""));
if (setInfo.NewValue.TrackId != null)
if (newBeatmapSet.TrackId != null)
{
artist.AddArbitraryDrawable(Empty().With(d => d.Width = 10));
artist.AddArbitraryDrawable(new FeaturedArtistBeatmapBadge());