mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Remove IBeatmapSetOnlineInfo
implementation from BeatmapSetInfo
to avoid null cases
This commit is contained in:
@ -57,7 +57,12 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
return new OnlineBeatmapSetCover(online, beatmapSetCoverType);
|
||||
|
||||
if (model is BeatmapInfo localModel)
|
||||
{
|
||||
if (localModel.BeatmapSet?.OnlineInfo != null)
|
||||
return new OnlineBeatmapSetCover(localModel.BeatmapSet.OnlineInfo, beatmapSetCoverType);
|
||||
|
||||
return new BeatmapBackgroundSprite(beatmaps.GetWorkingBeatmap(localModel));
|
||||
}
|
||||
|
||||
return new BeatmapBackgroundSprite(beatmaps.DefaultBeatmap);
|
||||
}
|
||||
|
Reference in New Issue
Block a user