Merge branch 'thread-safe-spectator-client'

This commit is contained in:
smoogipoo
2021-05-21 16:00:24 +09:00
3 changed files with 122 additions and 151 deletions

View File

@ -55,8 +55,6 @@ namespace osu.Game.Screens.Play.HUD
foreach (var userId in playingUsers)
{
spectatorClient.WatchUser(userId);
// probably won't be required in the final implementation.
var resolvedUser = userLookupCache.GetUserAsync(userId).Result;
@ -80,6 +78,8 @@ namespace osu.Game.Screens.Play.HUD
// BindableList handles binding in a really bad way (Clear then AddRange) so we need to do this manually..
foreach (int userId in playingUsers)
{
spectatorClient.WatchUser(userId);
if (!multiplayerClient.CurrentMatchPlayingUserIds.Contains(userId))
usersChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, new[] { userId }));
}