Update addItem() implementation

This commit is contained in:
Dan Balasescu 2021-12-06 15:09:06 +09:00
parent 85d3b70d8c
commit 5be74af8fe

View File

@ -430,13 +430,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
Debug.Assert(Room != null);
// Add the item to the list first in order to compute gameplay order.
item.ID = long.MaxValue;
serverSidePlaylist.Add(item);
await updatePlaylistOrder(Room).ConfigureAwait(false);
item.ID = ++lastPlaylistItemId;
serverSidePlaylist.Add(item);
await ((IMultiplayerClient)this).PlaylistItemAdded(item).ConfigureAwait(false);
await updatePlaylistOrder(Room).ConfigureAwait(false);
}
private async Task updateCurrentItem(MultiplayerRoom room, bool notify = true)