mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +08:00
Mutate playlist in EditUserPlaylistItem
This commit is contained in:
parent
6e6271d0c0
commit
e1f147a207
@ -458,8 +458,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
public async Task EditUserPlaylistItem(int userId, MultiplayerPlaylistItem item)
|
public async Task EditUserPlaylistItem(int userId, MultiplayerPlaylistItem item)
|
||||||
{
|
{
|
||||||
Debug.Assert(Room != null);
|
Debug.Assert(Room != null);
|
||||||
Debug.Assert(APIRoom != null);
|
|
||||||
Debug.Assert(currentItem != null);
|
Debug.Assert(currentItem != null);
|
||||||
|
Debug.Assert(serverSideAPIRoom != null);
|
||||||
|
|
||||||
item.OwnerID = userId;
|
item.OwnerID = userId;
|
||||||
|
|
||||||
@ -478,6 +478,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
item.PlaylistOrder = existingItem.PlaylistOrder;
|
item.PlaylistOrder = existingItem.PlaylistOrder;
|
||||||
|
|
||||||
serverSidePlaylist[serverSidePlaylist.IndexOf(existingItem)] = item;
|
serverSidePlaylist[serverSidePlaylist.IndexOf(existingItem)] = item;
|
||||||
|
serverSideAPIRoom.Playlist[serverSideAPIRoom.Playlist.IndexOf(serverSideAPIRoom.Playlist.Single(i => i.ID == item.ID))] = new PlaylistItem(item);
|
||||||
|
|
||||||
await ((IMultiplayerClient)this).PlaylistItemChanged(item).ConfigureAwait(false);
|
await ((IMultiplayerClient)this).PlaylistItemChanged(item).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user