Fixed bug not re-performing handshake on logout

Fixes #31
This commit is contained in:
2020-09-25 22:00:34 +02:00
parent af219274f5
commit 108db1ae11
5 changed files with 14 additions and 13 deletions

View File

@@ -72,7 +72,7 @@ public class ContactSearchTab implements EventListener {
}
/**
* Disables the clear and search button if no text is present in the search bar.
* If text is present, sends a request to the server.
*
* @since Envoy Client v0.1-beta
*/
@@ -111,12 +111,12 @@ public class ContactSearchTab implements EventListener {
}
}
private void addAsContact() {
private void addAsContact() {
// Sends the event to the server
final var event = new ContactOperation(currentlySelectedUser, ElementOperation.ADD);
eventBus.dispatch(new SendEvent(event));
// Removes the chosen user and updates the UI
userList.getItems().remove(currentlySelectedUser);
eventBus.dispatch(event);