Commit 92ea9ad8 authored by Fabien Boucaud's avatar Fabien Boucaud

Update DataFacade.java with calls to IHMMainFacade for refreshing when...

Update DataFacade.java with calls to IHMMainFacade for refreshing when adding/removing a game or user to the respective lists (asked by IHM Main).
parent c8aa6a57
...@@ -163,6 +163,12 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain { ...@@ -163,6 +163,12 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
public void addNewGame(StatGame game) { public void addNewGame(StatGame game) {
this.gameMediator.addNewGame(game); this.gameMediator.addNewGame(game);
try {
this.ihmMainFacade.refreshGameList();
} catch (IOException ex) {
Logger.getLogger(DataFacade.class.getName()).log(Level.SEVERE, null, ex.getMessage());
}
} }
...@@ -214,6 +220,12 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain { ...@@ -214,6 +220,12 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
public void addConnectedUser(LightPublicUser user) { public void addConnectedUser(LightPublicUser user) {
this.userMediator.addConnectedUser(user); this.userMediator.addConnectedUser(user);
try {
this.ihmMainFacade.refreshUserList();
} catch (IOException ex) {
Logger.getLogger(DataFacade.class.getName()).log(Level.SEVERE, null, ex.getMessage());
}
} }
...@@ -228,6 +240,12 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain { ...@@ -228,6 +240,12 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
} catch (RuntimeException e) { } catch (RuntimeException e) {
Logger.getLogger(DataFacade.class.getName()).log(Level.WARNING, e.getMessage()); Logger.getLogger(DataFacade.class.getName()).log(Level.WARNING, e.getMessage());
} }
try {
this.ihmMainFacade.refreshUserList();
} catch (IOException ex) {
Logger.getLogger(DataFacade.class.getName()).log(Level.SEVERE, null, ex.getMessage());
}
} }
......
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