mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 08:33:55 +09: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:
@ -102,6 +102,7 @@ namespace osu.Game.Beatmaps
|
|||||||
if (beatmap.Hidden) return false;
|
if (beatmap.Hidden) return false;
|
||||||
|
|
||||||
beatmap.Hidden = true;
|
beatmap.Hidden = true;
|
||||||
|
context.Update(beatmap);
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
|
|
||||||
BeatmapHidden?.Invoke(beatmap);
|
BeatmapHidden?.Invoke(beatmap);
|
||||||
@ -120,6 +121,7 @@ namespace osu.Game.Beatmaps
|
|||||||
if (!beatmap.Hidden) return false;
|
if (!beatmap.Hidden) return false;
|
||||||
|
|
||||||
beatmap.Hidden = false;
|
beatmap.Hidden = false;
|
||||||
|
context.Update(beatmap);
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
|
|
||||||
BeatmapRestored?.Invoke(beatmap);
|
BeatmapRestored?.Invoke(beatmap);
|
||||||
|
Reference in New Issue
Block a user