From 7f83cf6780b5fb84e0da6ea6690894438d89d4d9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 20 Oct 2017 10:05:54 +0900 Subject: [PATCH] Fix hiding not always working Because we are not sharing a single context, we need to use Update to attach the entity to the local context. --- osu.Game/Beatmaps/BeatmapStore.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Game/Beatmaps/BeatmapStore.cs b/osu.Game/Beatmaps/BeatmapStore.cs index 8eac35a667..ad4c657619 100644 --- a/osu.Game/Beatmaps/BeatmapStore.cs +++ b/osu.Game/Beatmaps/BeatmapStore.cs @@ -102,6 +102,7 @@ namespace osu.Game.Beatmaps if (beatmap.Hidden) return false; beatmap.Hidden = true; + context.Update(beatmap); context.SaveChanges(); BeatmapHidden?.Invoke(beatmap); @@ -120,6 +121,7 @@ namespace osu.Game.Beatmaps if (!beatmap.Hidden) return false; beatmap.Hidden = false; + context.Update(beatmap); context.SaveChanges(); BeatmapRestored?.Invoke(beatmap);