From 32b3ea70b966e4087d70d72f1306f55b4fa8b264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 4 May 2021 21:12:50 +0200 Subject: [PATCH] Fix both covers showing if cover is not fully opaque --- osu.Game/Beatmaps/Drawables/UpdateableBeatmapSetCover.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapSetCover.cs b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapSetCover.cs index 3a4423e42e..b376690436 100644 --- a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapSetCover.cs +++ b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapSetCover.cs @@ -41,6 +41,10 @@ namespace osu.Game.Beatmaps.Drawables protected override DelayedLoadWrapper CreateDelayedLoadWrapper(Func createContentFunc, double timeBeforeLoad) => new DelayedLoadUnloadWrapper(createContentFunc, timeBeforeLoad); + // by default, ModelBackedDrawable hides the old drawable only after the new one has been fully loaded. + // this can lead to weird appearance if the cover is not fully opaque, so fade out as soon as a new load is requested in this particular case. + protected override void OnLoadStarted() => ApplyHideTransforms(DisplayedDrawable); + protected override Drawable CreateDrawable(BeatmapSetInfo model) { if (model == null)