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:
parent
22d39c6bf7
commit
7f83cf6780
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user