Add partially working blocking and deletion (for both client and server)

Additionally had to refactor several classes "a little bit".
(Whenever one bug seemed fixed, another one appeared...)
This commit is contained in:
2020-10-11 23:04:25 +02:00
parent f97d61e58d
commit 7bdcfad08c
20 changed files with 326 additions and 94 deletions

View File

@@ -63,7 +63,7 @@ public class ContactSearchTab implements EventListener {
}
@Event
private void onContactOperation(ContactOperation operation) {
private void onUserOperation(UserOperation operation) {
final var contact = operation.get();
if (operation.getOperationType() == ElementOperation.ADD) Platform.runLater(() -> {
userList.getItems().remove(contact);
@@ -96,7 +96,7 @@ public class ContactSearchTab implements EventListener {
}
/**
* Sends an {@link ContactOperation} for the selected user to the
* Sends an {@link UserOperation} for the selected user to the
* server.
*
* @since Envoy Client v0.1-beta
@@ -114,7 +114,7 @@ public class ContactSearchTab implements EventListener {
private void addAsContact() {
// Sends the event to the server
final var event = new ContactOperation(currentlySelectedUser, ElementOperation.ADD);
final var event = new UserOperation(currentlySelectedUser, ElementOperation.ADD);
client.send(event);
// Removes the chosen user and updates the UI