mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +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;
|
||||
|
||||
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);
|
||||
|
Reference in New Issue
Block a user