Sort outgoing messages on recipient

pull/185/head
M66B 4 years ago
parent 96263694b3
commit 1dcc7d2c03

@ -874,8 +874,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
boolean outbox = EntityFolder.OUTBOX.equals(message.folderType); boolean outbox = EntityFolder.OUTBOX.equals(message.folderType);
boolean outgoing = isOutgoing(message); boolean outgoing = isOutgoing(message);
boolean reverse = (outgoing && boolean reverse = (outgoing &&
(viewType != ViewType.THREAD || !threading) && (viewType != ViewType.THREAD || !threading) && !show_recipients);
!show_recipients && !"sender".equals(sort));
Address[] senders = ContactInfo.fillIn(reverse ? message.to : message.senders, prefer_contact); Address[] senders = ContactInfo.fillIn(reverse ? message.to : message.senders, prefer_contact);
Address[] recipients = ContactInfo.fillIn(reverse ? message.from : message.recipients, prefer_contact); Address[] recipients = ContactInfo.fillIn(reverse ? message.from : message.recipients, prefer_contact);
boolean authenticated = boolean authenticated =

@ -2716,7 +2716,7 @@ class Core {
EntityIdentity identity = matchIdentity(context, folder, message); EntityIdentity identity = matchIdentity(context, folder, message);
message.identity = (identity == null ? null : identity.id); message.identity = (identity == null ? null : identity.id);
message.sender = MessageHelper.getSortKey(message.from); message.sender = MessageHelper.getSortKey(EntityFolder.isOutgoing(folder.type) ? message.to : message.from);
Uri lookupUri = ContactInfo.getLookupUri(message.from); Uri lookupUri = ContactInfo.getLookupUri(message.from);
message.avatar = (lookupUri == null ? null : lookupUri.toString()); message.avatar = (lookupUri == null ? null : lookupUri.toString());
if (message.avatar == null && notify_known && pro) if (message.avatar == null && notify_known && pro)

Loading…
Cancel
Save