diff --git a/client/src/main/java/envoy/client/ui/controller/ContactSearchScene.java b/client/src/main/java/envoy/client/ui/controller/ContactSearchScene.java index 5b5c448..e21c646 100644 --- a/client/src/main/java/envoy/client/ui/controller/ContactSearchScene.java +++ b/client/src/main/java/envoy/client/ui/controller/ContactSearchScene.java @@ -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); }));