Sort outgoing messages on recipient

This commit is contained in:
M66B 2020-09-15 09:37:23 +02:00
parent 96263694b3
commit 1dcc7d2c03
2 changed files with 2 additions and 3 deletions

View File

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

View File

@ -2716,7 +2716,7 @@ class Core {
EntityIdentity identity = matchIdentity(context, folder, message);
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);
message.avatar = (lookupUri == null ? null : lookupUri.toString());
if (message.avatar == null && notify_known && pro)