From d5239d550a0a1952591c5cb57f091cf543eb26e8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 11 Jan 2022 22:55:00 +0900 Subject: [PATCH] Add refetch for non-managed hide/restore attempts --- osu.Game/Beatmaps/BeatmapManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 2cdae2b047..b0c7efc9d9 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -122,6 +122,9 @@ namespace osu.Game.Beatmaps using (var realm = contextFactory.CreateContext()) using (var transaction = realm.BeginWrite()) { + if (!beatmapInfo.IsManaged) + beatmapInfo = realm.Find(beatmapInfo.ID); + beatmapInfo.Hidden = true; transaction.Commit(); } @@ -136,6 +139,9 @@ namespace osu.Game.Beatmaps using (var realm = contextFactory.CreateContext()) using (var transaction = realm.BeginWrite()) { + if (!beatmapInfo.IsManaged) + beatmapInfo = realm.Find(beatmapInfo.ID); + beatmapInfo.Hidden = false; transaction.Commit(); }