Fix lounge screen content not matching current room playlist item

This commit is contained in:
Bartłomiej Dach
2021-12-20 13:19:00 +01:00
parent a59583ee09
commit a5a9922f81
5 changed files with 11 additions and 13 deletions

View File

@ -14,10 +14,10 @@ namespace osu.Game.Online.Rooms
public static class PlaylistExtensions
{
/// <summary>
/// Returns the next <see cref="PlaylistItem"/> to be played from the supplied <paramref name="playlist"/>,
/// Returns the first non-expired <see cref="PlaylistItem"/> in playlist order from the supplied <paramref name="playlist"/>,
/// or <see langword="null"/> if all items are expired.
/// </summary>
public static PlaylistItem? GetNextItem(this IEnumerable<PlaylistItem> playlist) =>
public static PlaylistItem? GetCurrentItem(this IEnumerable<PlaylistItem> playlist) =>
playlist.OrderBy(item => item.PlaylistOrder).FirstOrDefault(item => !item.Expired);
public static string GetTotalDuration(this BindableList<PlaylistItem> playlist) =>