Moved "undelete all" logic to BeatmapManager and added a progress notification

This commit is contained in:
FreezyLemon
2017-12-18 10:55:07 +01:00
parent 4c45102d61
commit d2b80fdbfc
2 changed files with 31 additions and 5 deletions

View File

@ -62,11 +62,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
Action = () =>
{
undeleteButton.Enabled.Value = false;
Task.Run(() =>
{
foreach (var bs in beatmaps.QueryBeatmapSets(bs => bs.DeletePending).ToList())
beatmaps.Undelete(bs);
}).ContinueWith(t => Schedule(() => undeleteButton.Enabled.Value = true));
Task.Run(() => beatmaps.UndeleteAll()).ContinueWith(t => Schedule(() => undeleteButton.Enabled.Value = true));
}
},
};