Removed the selected user from ContactSearchScene upon addition

This commit is contained in:
delvh 2020-07-16 17:36:57 +02:00
parent bc355f190f
commit fb4fd85fe4

View File

@ -118,7 +118,8 @@ public class ContactSearchScene {
final var event = new ContactOperation(user, ElementOperation.ADD);
// Sends the event to the server
eventBus.dispatch(new SendEvent(event));
// Updates the UI
// Removes the chosen user and updates the UI
userList.getItems().remove(user);
eventBus.dispatch(event);
logger.log(Level.INFO, "Added user " + user);
}));