mirror of https://github.com/ppy/osu
Remove some unnecessary update calls
This commit is contained in:
parent
4841d4a937
commit
668f68dd63
|
@ -66,7 +66,6 @@ public bool Delete(BeatmapSetInfo beatmapSet)
|
|||
if (beatmapSet.DeletePending) return false;
|
||||
|
||||
beatmapSet.DeletePending = true;
|
||||
context.BeatmapSetInfo.Update(beatmapSet);
|
||||
context.SaveChanges();
|
||||
|
||||
BeatmapSetRemoved?.Invoke(beatmapSet);
|
||||
|
@ -85,7 +84,6 @@ public bool Undelete(BeatmapSetInfo beatmapSet)
|
|||
if (!beatmapSet.DeletePending) return false;
|
||||
|
||||
beatmapSet.DeletePending = false;
|
||||
context.BeatmapSetInfo.Update(beatmapSet);
|
||||
context.SaveChanges();
|
||||
|
||||
BeatmapSetAdded?.Invoke(beatmapSet);
|
||||
|
@ -104,7 +102,6 @@ public bool Hide(BeatmapInfo beatmap)
|
|||
if (beatmap.Hidden) return false;
|
||||
|
||||
beatmap.Hidden = true;
|
||||
context.BeatmapInfo.Update(beatmap);
|
||||
context.SaveChanges();
|
||||
|
||||
BeatmapHidden?.Invoke(beatmap);
|
||||
|
@ -123,7 +120,6 @@ public bool Restore(BeatmapInfo beatmap)
|
|||
if (!beatmap.Hidden) return false;
|
||||
|
||||
beatmap.Hidden = false;
|
||||
context.BeatmapInfo.Update(beatmap);
|
||||
context.SaveChanges();
|
||||
|
||||
BeatmapRestored?.Invoke(beatmap);
|
||||
|
|
Loading…
Reference in New Issue