1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:52:54 +08:00

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.
This commit is contained in:
Dean Herbert 2017-10-20 10:05:54 +09:00
parent 22d39c6bf7
commit 7f83cf6780

View File

@ -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);