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:
parent
2d0240437a
commit
c1e9b6d4ca
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user