added updating scores on lobby list receive

This commit is contained in:
Sem van der Hoeven
2020-10-23 13:58:44 +02:00
parent 5c2dea3ab4
commit da5528c7b2
3 changed files with 41 additions and 4 deletions

View File

@@ -112,7 +112,7 @@ namespace Client
private void updateLobbies()
{
Debug.WriteLine("updating lobbies...");
Debug.WriteLine("[VIEWMODEL] updating lobbies...");
Lobby[] lobbiesArr = client.Lobbies;
Application.Current.Dispatcher.Invoke(delegate
{
@@ -122,6 +122,11 @@ namespace Client
foreach (Lobby l in lobbiesArr)
{
_lobbies.Add(l);
Lobby clientLobby = ClientData.Instance.Lobby;
if (l.ID == clientLobby?.ID)
{
clientLobby = l;
}
}
});