mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +08:00
Fix hasBeatmap
potentially checking on outdated DeletePending
value
This commit is contained in:
parent
ea38b00b29
commit
485a57776b
@ -52,7 +52,15 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
return;
|
||||
|
||||
var databasedBeatmap = beatmaps.QueryBeatmap(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);
|
||||
hasBeatmap = databasedBeatmap != null && !databasedBeatmap.BeatmapSet.DeletePending;
|
||||
|
||||
if (databasedBeatmap == null)
|
||||
hasBeatmap = false;
|
||||
else
|
||||
{
|
||||
// DeletePending isn't updated in the beatmap info query above, need to directly query the beatmap set from database as well.
|
||||
var databasedSet = beatmaps.QueryBeatmapSet(s => s.Equals(databasedBeatmap.BeatmapSet));
|
||||
hasBeatmap = databasedSet?.DeletePending == false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
Loading…
Reference in New Issue
Block a user