From 29a667389d9ab7ac09ccd0d231f3811f0724abe8 Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 25 Jun 2020 11:19:59 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: CyB3RC0nN0R --- src/main/java/envoy/client/ui/ContactListCell.java | 5 ++++- src/main/java/envoy/client/ui/controller/ChatScene.java | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/envoy/client/ui/ContactListCell.java b/src/main/java/envoy/client/ui/ContactListCell.java index 0160885..4c7dcb9 100644 --- a/src/main/java/envoy/client/ui/ContactListCell.java +++ b/src/main/java/envoy/client/ui/ContactListCell.java @@ -39,7 +39,10 @@ public class ContactListCell extends ListCell { final var statusLabel = new Label(user.getStatus().toString()); statusLabel.getStyleClass().add(user.getStatus().toString().toLowerCase()); vbox.getChildren().add(statusLabel); - } else vbox.getChildren().add(new Label(((Group) contact).getContacts().size() + " members")); +} else { + // Member count + vbox.getChildren().add(new Label(((Group) contact).getContacts().size() + " members")); + } setGraphic(vbox); } } diff --git a/src/main/java/envoy/client/ui/controller/ChatScene.java b/src/main/java/envoy/client/ui/controller/ChatScene.java index 017e58f..df9db66 100644 --- a/src/main/java/envoy/client/ui/controller/ChatScene.java +++ b/src/main/java/envoy/client/ui/controller/ChatScene.java @@ -317,7 +317,7 @@ public final class ChatScene { */ private void scrollToMessageListEnd() { messageList.scrollTo(messageList.getItems().size() - 1); } - // =========== contextMenu actions ========== // + // Context menu actions @FXML private void copyMessage() { @@ -349,5 +349,4 @@ public final class ChatScene { updateRemainingCharsLabel(); postButton.setDisable(messageText.isBlank()); } - }