1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Merge pull request #28079 from peppy/fix-double-load-playlist-backgrounds

Fix beatmap backgrounds loading default briefly before final display
This commit is contained in:
Bartłomiej Dach 2024-05-03 08:48:07 +02:00 committed by GitHub
commit aecfcc86cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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