Apply suggestions from code review

Co-authored-by: CyB3RC0nN0R <CyB3RC0nN0R@users.noreply.github.com>
This commit is contained in:
delvh 2020-06-25 11:19:59 +02:00 committed by GitHub
parent bbd5f61486
commit 29a667389d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -39,7 +39,10 @@ public class ContactListCell extends ListCell<Contact> {
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);
}
}

View File

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