Removed unnecessary Label creation

This commit is contained in:
delvh 2020-06-30 22:11:09 +02:00
parent 2b1debbad7
commit 2c00539f8a

View File

@ -58,8 +58,7 @@ public class MessageListCell extends ListCell<Message> {
cell.getChildren().add(textLabel);
// Setting the message status icon and background color
if (message.getRecipientID() != client.getID()) {
final var statusIcon = new Label("", new ImageView(statusImages.get(message.getStatus())));
statusIcon.setPadding(new Insets(1, 0, 5, 5));
final var statusIcon = new ImageView(statusImages.get(message.getStatus()));
cell.getChildren().add(statusIcon);
cell.getStyleClass().add("own-message");
} else cell.getStyleClass().add("received-message");