mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:33:21 +08:00
Clean up pending deletion presets on startup
This commit is contained in:
parent
4a95638756
commit
c31e257a1f
@ -25,6 +25,7 @@ using osu.Game.Configuration;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Models;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Skinning;
|
||||
using Realms;
|
||||
@ -292,6 +293,11 @@ namespace osu.Game.Database
|
||||
foreach (var s in pendingDeleteSkins)
|
||||
realm.Remove(s);
|
||||
|
||||
var pendingDeletePresets = realm.All<ModPreset>().Where(s => s.DeletePending);
|
||||
|
||||
foreach (var s in pendingDeletePresets)
|
||||
realm.Remove(s);
|
||||
|
||||
transaction.Commit();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user