1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 05:32:56 +08:00

Remove unnecessary realm query helper method

This commit is contained in:
Dean Herbert 2022-01-26 11:53:50 +09:00
parent 1a776a9587
commit 64914c45a4

View File

@ -38,10 +38,6 @@ namespace osu.Game.Overlays.Music
private IDisposable beatmapSubscription;
private IQueryable<BeatmapSetInfo> availableBeatmaps => realm.Realm
.All<BeatmapSetInfo>()
.Where(s => !s.DeletePending);
private FilterControl filter;
private Playlist list;
@ -105,7 +101,7 @@ namespace osu.Game.Overlays.Music
// tests might bind externally, in which case we don't want to involve realm.
if (beatmapSets.Count == 0)
beatmapSubscription = realm.RegisterForNotifications(realm => availableBeatmaps, beatmapsChanged);
beatmapSubscription = realm.RegisterForNotifications(r => r.All<BeatmapSetInfo>().Where(s => !s.DeletePending), beatmapsChanged);
list.Items.BindTo(beatmapSets);
beatmap.BindValueChanged(working => list.SelectedSet.Value = working.NewValue.BeatmapSetInfo, true);