Fix PlaylistItemChanged() not updating current item

This commit is contained in:
smoogipoo 2021-10-29 15:44:42 +09:00
parent 746f4a49c1
commit 42dfb341da

View File

@ -625,6 +625,10 @@ namespace osu.Game.Online.Multiplayer
int index = APIRoom.Playlist.Select((i, index) => (i, index)).Single(kvp => kvp.i.ID == item.ID).index;
APIRoom.Playlist.RemoveAt(index);
APIRoom.Playlist.Insert(index, playlistItem);
// If the current item changed, update the selected playlist item.
if (item.ID == Room.Settings.PlaylistItemId)
CurrentMatchPlayingItem.Value = APIRoom.Playlist[index];
}).ConfigureAwait(false);
}