From a5a7992a0a25f9d12a8d6acf34dc276867951d78 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Mon, 13 Jul 2020 19:16:48 +0200 Subject: [PATCH] Fix FXML naming error --- .../envoy/client/ui/controller/ContactSearchScene.java | 9 +++------ .../envoy/client/ui/controller/GroupCreationScene.java | 2 +- client/src/main/resources/fxml/ContactSearchScene.fxml | 2 +- client/src/main/resources/fxml/GroupCreationScene.fxml | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) 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 b3bf823..1f3292a 100644 --- a/client/src/main/java/envoy/client/ui/controller/ContactSearchScene.java +++ b/client/src/main/java/envoy/client/ui/controller/ContactSearchScene.java @@ -70,10 +70,7 @@ public class ContactSearchScene { userList.setCellFactory(new ContactListCellFactory<>()); searchBar.setClearButtonListener(e -> { searchBar.getTextField().clear(); userList.getItems().clear(); }); eventBus.register(UserSearchResult.class, - response -> Platform.runLater(() -> { - userList.getItems().clear(); - userList.getItems().addAll(response.get()); - })); + response -> Platform.runLater(() -> { userList.getItems().clear(); userList.getItems().addAll(response.get()); })); } /** @@ -101,13 +98,13 @@ public class ContactSearchScene { } /** - * Sends an {@link ContactOperation} for every selected contact to the + * Sends an {@link ContactOperation} for the selected user to the * server. * * @since Envoy Client v0.1-beta */ @FXML - private void chatListClicked() { + private void userListClicked() { final var user = userList.getSelectionModel().getSelectedItem(); if (user != null) { final var alert = new Alert(AlertType.CONFIRMATION); diff --git a/client/src/main/java/envoy/client/ui/controller/GroupCreationScene.java b/client/src/main/java/envoy/client/ui/controller/GroupCreationScene.java index 3bf4265..719ef6f 100644 --- a/client/src/main/java/envoy/client/ui/controller/GroupCreationScene.java +++ b/client/src/main/java/envoy/client/ui/controller/GroupCreationScene.java @@ -82,7 +82,7 @@ public class GroupCreationScene { * @since Envoy Client v0.1-beta */ @FXML - private void chatListClicked() { + private void userListClicked() { createButton.setDisable(userList.getSelectionModel().isEmpty() || groupNameField.getTextField().getText().isBlank()); } diff --git a/client/src/main/resources/fxml/ContactSearchScene.fxml b/client/src/main/resources/fxml/ContactSearchScene.fxml index 9705bca..70f5fe5 100644 --- a/client/src/main/resources/fxml/ContactSearchScene.fxml +++ b/client/src/main/resources/fxml/ContactSearchScene.fxml @@ -46,7 +46,7 @@ - diff --git a/client/src/main/resources/fxml/GroupCreationScene.fxml b/client/src/main/resources/fxml/GroupCreationScene.fxml index a570afb..a8c7472 100644 --- a/client/src/main/resources/fxml/GroupCreationScene.fxml +++ b/client/src/main/resources/fxml/GroupCreationScene.fxml @@ -45,7 +45,7 @@ -