1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-09 04:13:39 +08:00

Migrate realm populating online lookup source to use helper method for retrieving tags

To reduce logic duplication.
This commit is contained in:
Bartłomiej Dach
2026-03-03 12:48:00 +01:00
Unverified
parent e64e0f0ca9
commit 2f96e96576
@@ -101,10 +101,9 @@ namespace osu.Game.Screens.SelectV2
if (dbBeatmap.MatchesOnlineVersion && dbBeatmap.Status != onlineBeatmap.Status)
dbBeatmap.Status = onlineBeatmap.Status;
HashSet<string> userTags = onlineBeatmap.TopTags?
.Select(t => (topTag: t, relatedTag: tagsById.GetValueOrDefault(t.TagId)))
.Where(t => t.relatedTag != null)
.Select(t => t.relatedTag!.Name)
onlineBeatmap.BeatmapSet = onlineBeatmapSet;
HashSet<string> userTags = onlineBeatmap.GetTopUserTags()?
.Select(t => t.Tag.Name)
.ToHashSet() ?? [];
if (!userTags.SetEquals(dbBeatmap.Metadata.UserTags))