From 7c53c7b602134ed40471bbed9e7616aff075af65 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Tue, 5 Mar 2019 15:33:39 +0900 Subject: [PATCH] Remove local background logic --- .../Drawables/UpdateableBeatmapBackgroundSprite.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs index 2414318db7..db98c8a9a9 100644 --- a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs @@ -9,7 +9,7 @@ using osu.Framework.Graphics.Containers; namespace osu.Game.Beatmaps.Drawables { /// - /// Display a baetmap background from a local source, but fallback to online source if not available. + /// Display a beatmap background from an online source /// public class UpdateableBeatmapBackgroundSprite : ModelBackedDrawable { @@ -30,14 +30,10 @@ namespace osu.Game.Beatmaps.Drawables { return new DelayedLoadUnloadWrapper(() => { - Drawable drawable; + if (model?.BeatmapSet?.OnlineInfo == null) + return null; - var localBeatmap = beatmaps.GetWorkingBeatmap(model); - - if (localBeatmap.BeatmapInfo.ID == 0 && model?.BeatmapSet?.OnlineInfo != null) - drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType); - else - drawable = new BeatmapBackgroundSprite(localBeatmap); + Drawable drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType); drawable.RelativeSizeAxes = Axes.Both; drawable.Anchor = Anchor.Centre;