Commit 60d144c3 authored by dkonam's avatar dkonam
Browse files

Data | fix users

parent b823240a
......@@ -283,6 +283,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public void leaveGame() {
System.out.println("leave game");
String role = this.gameMediator.getOwnerStatus();
if (!role.equals("spectator") && this.gameMediator.getCurrentGame() != null) {
Logger.getLogger(DataFacade.class.getName()).log(Level.INFO, null, "data | leave game");
......@@ -297,6 +298,8 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
this.opponentHasLeftGame();
} else {
System.out.println("leave spectator ");
this.ihmTablefacade.spectatorLeaveGame();
}
}
......
......@@ -333,6 +333,8 @@ public class UserMediator {
ObjectMapper mapper = new ObjectMapper();
//retrieval
Owner user = null;
try {
......@@ -371,6 +373,15 @@ public class UserMediator {
}
}
this.mapConnectedUser.clear();
try {
this.dataFacade.getIhmMainFacade().refreshUserList();
} catch (IOException ex) {
Logger.getLogger(UserMediator.class.getName()).log(Level.SEVERE, null, ex);
}
}
/**
......
Supports Markdown
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