Show document title in message as well (Cheogram)

This commit is contained in:
Arne 2023-05-24 19:36:22 +02:00
parent 76e8cb5f48
commit f121e77ca9

View file

@ -853,9 +853,12 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
});
WebxdcUpdate lastUpdate = activity.xmppConnectionService.findLastWebxdcUpdate(message);
if (lastUpdate != null && lastUpdate.getSummary() != null) {
if (lastUpdate != null && (lastUpdate.getSummary() != null || lastUpdate.getDocument() != null)) {
viewHolder.messageBody.setVisibility(View.VISIBLE);
viewHolder.messageBody.setText(lastUpdate.getSummary());
viewHolder.messageBody.setText(
(lastUpdate.getDocument() == null ? "" : lastUpdate.getDocument() + "\n") +
(lastUpdate.getSummary() == null ? "" : lastUpdate.getSummary())
);
}
}