1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 18:19:54 +08:00

Refresh realm before performing song select refetches following an online metadata lookup

Probably closes https://github.com/ppy/osu/issues/34716

Can't see any other cause, can reproduce the issue on master using
manual db modifications via realm studio and it is not a consistent
reproduction, so seems like an open-and-shut lack of refresh.
This commit is contained in:
Bartłomiej Dach
2025-08-18 09:41:56 +02:00
Unverified
parent 28fae938d5
commit a393b3c6b1
2 changed files with 2 additions and 0 deletions
@@ -440,6 +440,7 @@ namespace osu.Game.Screens.SelectV2
string[] tags = realm.Run(r =>
{
// need to refetch because `beatmap.Value.BeatmapInfo` is not going to have the latest tags
r.Refresh();
var refetchedBeatmap = r.Find<BeatmapInfo>(beatmap.Value.BeatmapInfo.ID);
return refetchedBeatmap?.Metadata.UserTags.ToArray() ?? [];
});
@@ -332,6 +332,7 @@ namespace osu.Game.Screens.SelectV2
// which prevents working beatmap refetches caused by changes to the realm model of perceived low importance).
var status = realm.Run(r =>
{
r.Refresh();
var refetchedBeatmap = r.Find<BeatmapInfo>(working.Value.BeatmapInfo.ID);
return refetchedBeatmap?.Status;
});