mirror of https://github.com/M66B/FairEmail.git
Let extra match identity
This commit is contained in:
parent
f8d09e9c10
commit
2bfc14f5c9
|
@ -2092,15 +2092,6 @@ public class FragmentCompose extends FragmentBase {
|
||||||
"list".equals(action) ||
|
"list".equals(action) ||
|
||||||
"receipt".equals(action) ||
|
"receipt".equals(action) ||
|
||||||
"participation".equals(action)) {
|
"participation".equals(action)) {
|
||||||
EntityFolder rfolder = db.folder().getFolder(ref.folder);
|
|
||||||
Address[] sender = (rfolder != null && EntityFolder.isOutgoing(rfolder.type) ? ref.from : ref.to);
|
|
||||||
if (sender != null && sender.length > 0) {
|
|
||||||
String s = ((InternetAddress) sender[0]).getAddress();
|
|
||||||
int at = s.indexOf('@');
|
|
||||||
if (at > 0)
|
|
||||||
data.draft.extra = s.substring(0, at);
|
|
||||||
}
|
|
||||||
|
|
||||||
data.draft.references = (ref.references == null ? "" : ref.references + " ") + ref.msgid;
|
data.draft.references = (ref.references == null ? "" : ref.references + " ") + ref.msgid;
|
||||||
data.draft.inreplyto = ref.msgid;
|
data.draft.inreplyto = ref.msgid;
|
||||||
data.draft.thread = ref.thread;
|
data.draft.thread = ref.thread;
|
||||||
|
@ -2255,6 +2246,10 @@ public class FragmentCompose extends FragmentBase {
|
||||||
data.draft.identity = selected.id;
|
data.draft.identity = selected.id;
|
||||||
data.draft.from = new InternetAddress[]{new InternetAddress(selected.email, selected.name)};
|
data.draft.from = new InternetAddress[]{new InternetAddress(selected.email, selected.name)};
|
||||||
|
|
||||||
|
int at = selected.email.indexOf('@');
|
||||||
|
if (at > 0)
|
||||||
|
data.draft.extra = selected.email.substring(0, at);
|
||||||
|
|
||||||
data.draft.sender = MessageHelper.getSortKey(data.draft.from);
|
data.draft.sender = MessageHelper.getSortKey(data.draft.from);
|
||||||
Uri lookupUri = ContactInfo.getLookupUri(context, data.draft.from);
|
Uri lookupUri = ContactInfo.getLookupUri(context, data.draft.from);
|
||||||
data.draft.avatar = (lookupUri == null ? null : lookupUri.toString());
|
data.draft.avatar = (lookupUri == null ? null : lookupUri.toString());
|
||||||
|
|
Loading…
Reference in New Issue