removal of Lobby now runs on Platform.runLater(). Untested.

This commit is contained in:
Sebastian Lenzlinger 2022-05-02 00:53:25 +02:00
parent 62992ae84c
commit 651a07e32e
2 changed files with 16 additions and 5 deletions

View File

@ -19,7 +19,7 @@ public class BudaLogConfig {
LoggerContext ctx = (LoggerContext) LogManager.getContext(false); LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
Configuration config = ctx.getConfiguration(); Configuration config = ctx.getConfiguration();
LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME); LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
loggerConfig.setLevel(Level.INFO); // change level here loggerConfig.setLevel(Level.DEBUG); // change level here
ctx.updateLoggers(); // This causes all Loggers to refetch information from their LoggerConfig. ctx.updateLoggers(); // This causes all Loggers to refetch information from their LoggerConfig.
} }

View File

@ -599,15 +599,26 @@ public class LoungeSceneViewController implements Initializable {
}); });
} }
/**
* Should remove the lobby from the lobby list view
*
* @param data
*/
public void removeLobbyFromView(String data) { public void removeLobbyFromView(String data) {
Iterator<LobbyListItem> itr = lobbies.iterator(); Iterator<LobbyListItem> itr = lobbies.iterator();
while (itr.hasNext()) { while (itr.hasNext()) {
LobbyListItem item = itr.next(); LobbyListItem item = itr.next();
if (item.getLobbyID().equals(data)) { if (item.getLobbyID().equals(data)) {
itr.remove(); Platform.runLater(new Runnable() {
LOGGER.debug( @Override
"Made it into removeLobbyFromView if clause for lobby w/ ID: " + item.getLobbyID() public void run() {
+ " for data passed: " + data); itr.remove();
LOGGER.debug(
"Made it into removeLobbyFromView if clause for lobby w/ ID: " + item.getLobbyID()
+ " for data passed: " + data);
}
});
} }
} }
} }