1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 22:22:59 +08:00

No longer remove expired playlist items from Room model

This commit is contained in:
Dan Balasescu 2024-11-22 17:19:26 +09:00
parent 479ff7eb41
commit e59ac9e7c8
No known key found for this signature in database
3 changed files with 0 additions and 15 deletions

View File

@ -388,21 +388,10 @@ namespace osu.Game.Online.Rooms
CurrentPlaylistItem = other.CurrentPlaylistItem;
AutoSkip = other.AutoSkip;
other.RemoveExpiredPlaylistItems();
Playlist = other.Playlist;
RecentParticipants = other.RecentParticipants;
}
public void RemoveExpiredPlaylistItems()
{
// Todo: This is not the best way/place to do this, but the intention is to display all playlist items when the room has ended,
// and display only the non-expired playlist items while the room is still active. In order to achieve this, all expired items are removed from the source Room.
// More refactoring is required before this can be done locally instead - DrawableRoomPlaylist is currently directly bound to the playlist to display items in the room.
if (Status is not RoomStatusEnded)
Playlist = Playlist.Where(i => !i.Expired).ToArray();
}
[JsonObject(MemberSerialization.OptIn)]
public class RoomPlaylistItemStats
{

View File

@ -60,10 +60,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
}
foreach (var incoming in result)
{
incoming.RemoveExpiredPlaylistItems();
RoomManager.AddOrUpdateRoom(incoming);
}
initialRoomsReceived.Value = true;
tcs.SetResult(true);

View File

@ -36,7 +36,6 @@ namespace osu.Game.Screens.OnlinePlay.Components
req.Success += result =>
{
result.RemoveExpiredPlaylistItems();
RoomManager.AddOrUpdateRoom(result);
tcs.SetResult(true);
};