Remove Javadoc header from all source files

Also removed SendEvent and simplified some other calls.
This commit is contained in:
2020-09-25 14:29:23 +02:00
parent f0e645c0ae
commit 8eb7743057
140 changed files with 397 additions and 1260 deletions

View File

@@ -7,8 +7,11 @@ import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.control.Alert.AlertType;
import envoy.client.event.*;
import envoy.client.ui.listcell.*;
import envoy.client.data.Context;
import envoy.client.event.BackEvent;
import envoy.client.net.Client;
import envoy.client.ui.control.ContactControl;
import envoy.client.ui.listcell.ListCellFactory;
import envoy.data.User;
import envoy.event.ElementOperation;
import envoy.event.contact.*;
@@ -25,10 +28,6 @@ import dev.kske.eventbus.*;
* <p>
* To create a group, a button is available that loads the
* {@link GroupCreationTab}.
* <p>
* Project: <strong>envoy-client</strong><br>
* File: <strong>ContactSearchScene.java</strong><br>
* Created: <strong>07.06.2020</strong><br>
*
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
@@ -46,6 +45,7 @@ public class ContactSearchTab implements EventListener {
private final Alert alert = new Alert(AlertType.CONFIRMATION);
private static final Client client = Context.getInstance().getClient();
private static final EventBus eventBus = EventBus.getInstance();
private static final Logger logger = EnvoyLog.getLogger(ChatScene.class);
@@ -77,7 +77,7 @@ public class ContactSearchTab implements EventListener {
@FXML
private void sendRequest() {
final var text = searchBar.getText().strip();
if (!text.isBlank()) eventBus.dispatch(new SendEvent(new UserSearchRequest(text)));
if (!text.isBlank()) client.send(new UserSearchRequest(text));
else userList.getItems().clear();
}
@@ -106,7 +106,7 @@ public class ContactSearchTab implements EventListener {
currentlySelectedUser = user;
final var event = new ContactOperation(currentlySelectedUser, ElementOperation.ADD);
// Sends the event to the server
eventBus.dispatch(new SendEvent(event));
client.send(event);
// Removes the chosen user and updates the UI
userList.getItems().remove(currentlySelectedUser);
eventBus.dispatch(event);