Display status for own messages instead of received ones

This commit is contained in:
Kai S. K. Engelbart 2020-06-27 17:14:07 +02:00
parent 8092971e89
commit c6e28aba10

View File

@ -43,7 +43,7 @@ public class MessageListCell extends ListCell<Message> {
setGraphic(null);
} else {
final var cell = new VBox(new Label(dateFormat.format(message.getCreationDate())), new Label(message.getText()));
if (message.getRecipientID() == client.getID()) {
if (message.getRecipientID() != client.getID()) {
cell.getChildren().add(new Label("", new ImageView(statusImages.get(message.getStatus()))));
cell.getStyleClass().add("own-message");
} else cell.getStyleClass().add("received-message");