1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Prepend from/to to senders/recipients

This commit is contained in:
M66B 2024-05-08 12:59:51 +02:00
parent cd07035e71
commit df5fbe9f35

View file

@ -8779,12 +8779,24 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (message != null) {
keyPosition.put(message.id, i);
positionKey.put(i, message.id);
addExtra(message.from, message.extra);
if (threading) {
if (message.senders == null || message.senders.length == 0)
message.senders = message.from;
if (message.recipients == null || message.recipients.length == 0)
message.recipients = message.to;
List<Address> senders = new ArrayList<>();
if (message.from != null)
senders.addAll(Arrays.asList(message.from));
if (message.senders != null)
senders.addAll(Arrays.asList(message.senders));
message.senders = senders.toArray(new Address[0]);
List<Address> recipients = new ArrayList<>();
if (message.to != null)
recipients.addAll(Arrays.asList(message.to));
if (message.recipients != null)
recipients.addAll(Arrays.asList(message.recipients));
message.recipients = recipients.toArray(new Address[0]);
addExtra(message.senders, message.extra);
} else {
message.senders = message.from;