Commit 04facfd0 authored by Cynthia SOIMANSOIB's avatar Cynthia SOIMANSOIB
Browse files

Fix Authenticated User appears 2 times in User List

Add new user to the list is a broadcast, so the user who just authenticated
also gets the message with him as a new player and so he appears 2 times in
his own list. Now, there is a check to make sure a user can't add himself to
the list.
parent 8ed31434
......@@ -32,8 +32,10 @@ public class ComToDataClientImpl implements IComToData {
@Override
public void addNewUser(UserLight user) {
dataCoreClient.getListConnectedUsers().add(user);
dataCoreClient.getDataToMain().updateUserList(user);
if(!dataCoreClient.getLocalUserLight().getId().equals(user.getId()) ) {
dataCoreClient.getListConnectedUsers().add(user);
dataCoreClient.getDataToMain().updateUserList(user);
}
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment