mirror of https://github.com/ppy/osu
Rename currentUserStates -> playingUserStates
This commit is contained in:
parent
de9e37857e
commit
83716ddb08
|
@ -47,7 +47,7 @@ public class SpectatorStreamingClient : Component, ISpectatorClient
|
|||
|
||||
private readonly BindableList<int> playingUsers = new BindableList<int>();
|
||||
|
||||
private readonly Dictionary<int, SpectatorState> currentUserStates = new Dictionary<int, SpectatorState>();
|
||||
private readonly Dictionary<int, SpectatorState> playingUserStates = new Dictionary<int, SpectatorState>();
|
||||
|
||||
[CanBeNull]
|
||||
private IBeatmap currentBeatmap;
|
||||
|
@ -128,7 +128,7 @@ private void load(IAPIProvider api)
|
|||
lock (userLock)
|
||||
{
|
||||
playingUsers.Clear();
|
||||
currentUserStates.Clear();
|
||||
playingUserStates.Clear();
|
||||
}
|
||||
}
|
||||
}, true);
|
||||
|
@ -142,7 +142,7 @@ Task ISpectatorClient.UserBeganPlaying(int userId, SpectatorState state)
|
|||
if (!playingUsers.Contains(userId))
|
||||
playingUsers.Add(userId);
|
||||
|
||||
currentUserStates[userId] = state;
|
||||
playingUserStates[userId] = state;
|
||||
}
|
||||
|
||||
OnUserBeganPlaying?.Invoke(userId, state);
|
||||
|
@ -155,7 +155,7 @@ Task ISpectatorClient.UserFinishedPlaying(int userId, SpectatorState state)
|
|||
lock (userLock)
|
||||
{
|
||||
playingUsers.Remove(userId);
|
||||
currentUserStates.Remove(userId);
|
||||
playingUserStates.Remove(userId);
|
||||
}
|
||||
|
||||
OnUserFinishedPlaying?.Invoke(userId, state);
|
||||
|
@ -298,7 +298,7 @@ public void BindUserBeganPlaying(Action<int, SpectatorState> callback, bool runO
|
|||
|
||||
lock (userLock)
|
||||
{
|
||||
foreach (var (userId, state) in currentUserStates)
|
||||
foreach (var (userId, state) in playingUserStates)
|
||||
callback(userId, state);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue