Removed unnecessary Label creation
This commit is contained in:
parent
2b1debbad7
commit
2c00539f8a
@ -58,8 +58,7 @@ public class MessageListCell extends ListCell<Message> {
|
|||||||
cell.getChildren().add(textLabel);
|
cell.getChildren().add(textLabel);
|
||||||
// Setting the message status icon and background color
|
// Setting the message status icon and background color
|
||||||
if (message.getRecipientID() != client.getID()) {
|
if (message.getRecipientID() != client.getID()) {
|
||||||
final var statusIcon = new Label("", new ImageView(statusImages.get(message.getStatus())));
|
final var statusIcon = new ImageView(statusImages.get(message.getStatus()));
|
||||||
statusIcon.setPadding(new Insets(1, 0, 5, 5));
|
|
||||||
cell.getChildren().add(statusIcon);
|
cell.getChildren().add(statusIcon);
|
||||||
cell.getStyleClass().add("own-message");
|
cell.getStyleClass().add("own-message");
|
||||||
} else cell.getStyleClass().add("received-message");
|
} else cell.getStyleClass().add("received-message");
|
||||||
|
Reference in New Issue
Block a user