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

Fix tests failing if playlist was empty

This commit is contained in:
Layendan 2025-02-09 23:27:28 -07:00
parent f9bda0524a
commit 5e9f195117

View File

@ -75,7 +75,8 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
{
base.LoadComplete();
beatmapSubscription = realmAccess.RegisterForNotifications(r => r.All<BeatmapInfo>().Filter(formatFilterQuery(room.Playlist)), (sender, _) => downloadedBeatmapsCount.Value = sender.Count);
if (room.Playlist.Count > 0)
beatmapSubscription = realmAccess.RegisterForNotifications(r => r.All<BeatmapInfo>().Filter(formatFilterQuery(room.Playlist)), (sender, _) => downloadedBeatmapsCount.Value = sender.Count);
collectionSubscription = realmAccess.RegisterForNotifications(r => r.All<BeatmapCollection>().Where(c => c.Name == room.Name), (sender, _) => collectionExists.Value = sender.Count > 0);