1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 06:23:47 +08:00

Remove some unnecessary update calls

This commit is contained in:
Dean Herbert
2017-10-18 18:27:57 +09:00
Unverified
parent 4841d4a937
commit 668f68dd63
-4
View File
@@ -66,7 +66,6 @@ namespace osu.Game.Beatmaps
if (beatmapSet.DeletePending) return false;
beatmapSet.DeletePending = true;
context.BeatmapSetInfo.Update(beatmapSet);
context.SaveChanges();
BeatmapSetRemoved?.Invoke(beatmapSet);
@@ -85,7 +84,6 @@ namespace osu.Game.Beatmaps
if (!beatmapSet.DeletePending) return false;
beatmapSet.DeletePending = false;
context.BeatmapSetInfo.Update(beatmapSet);
context.SaveChanges();
BeatmapSetAdded?.Invoke(beatmapSet);
@@ -104,7 +102,6 @@ namespace osu.Game.Beatmaps
if (beatmap.Hidden) return false;
beatmap.Hidden = true;
context.BeatmapInfo.Update(beatmap);
context.SaveChanges();
BeatmapHidden?.Invoke(beatmap);
@@ -123,7 +120,6 @@ namespace osu.Game.Beatmaps
if (!beatmap.Hidden) return false;
beatmap.Hidden = false;
context.BeatmapInfo.Update(beatmap);
context.SaveChanges();
BeatmapRestored?.Invoke(beatmap);