Fix FXML naming error

This commit is contained in:
Kai S. K. Engelbart 2020-07-13 19:16:48 +02:00
parent bbe19b1050
commit a5a7992a0a
No known key found for this signature in database
GPG Key ID: 0A48559CA32CB48F
4 changed files with 6 additions and 9 deletions

View File

@ -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);

View File

@ -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());
}

View File

@ -46,7 +46,7 @@
</Button>
</children>
</HBox>
<ListView fx:id="userList" onMouseClicked="#chatListClicked"
<ListView fx:id="userList" onMouseClicked="#userListClicked"
prefHeight="314.0" prefWidth="600.0">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />

View File

@ -45,7 +45,7 @@
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<ListView fx:id="userList" onMouseClicked="#chatListClicked"
<ListView fx:id="userList" onMouseClicked="#userListClicked"
prefHeight="314.0" prefWidth="600.0">
<VBox.margin>
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0" />