Set recognized extra only

pull/172/head
M66B 6 years ago
parent c1efe7a9b3
commit 3c8773c915

@ -117,6 +117,9 @@ public class EntityIdentity {
if (other == null) if (other == null)
return false; return false;
if (!other.contains("@") || !email.contains("@"))
return false;
return other.equalsIgnoreCase(email); return other.equalsIgnoreCase(email);
} }

@ -2814,13 +2814,12 @@ public class FragmentCompose extends FragmentBase {
preferred = (same == null ? similar : same); preferred = (same == null ? similar : same);
} }
} }
if (preferred == null) if (preferred != null) {
preferred = data.draft.from[0];
String from = ((InternetAddress) preferred).getAddress(); String from = ((InternetAddress) preferred).getAddress();
if (from != null && from.contains("@"))
data.draft.extra = from.substring(0, from.indexOf("@")); data.draft.extra = from.substring(0, from.indexOf("@"));
} }
} }
}
if ("reply_all".equals(action)) if ("reply_all".equals(action))
data.draft.cc = ref.getAllRecipients(data.identities, ref.account); data.draft.cc = ref.getAllRecipients(data.identities, ref.account);

Loading…
Cancel
Save