1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 07:43:00 +08:00

Fix beatmap backgrounds loading default briefly before final display

Due to the way `ModelBackedDrawable` works, the default starts to get
loaded even though a final `Beatmap` has been set. This avoids loading
the default fallback unless a beatmap has been set (and has no
background itself).
This commit is contained in:
Dean Herbert 2024-05-03 13:42:56 +08:00
parent 2d0240437a
commit c1e9b6d4ca
No known key found for this signature in database

View File

@ -52,6 +52,9 @@ namespace osu.Game.Beatmaps.Drawables
private Drawable getDrawableForModel(IBeatmapInfo? model)
{
if (model == null)
return Empty();
// prefer online cover where available.
if (model?.BeatmapSet is IBeatmapSetOnlineInfo online)
return new OnlineBeatmapSetCover(online, beatmapSetCoverType);