mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 01:06:04 +00:00
Save draft with invalid addresses
This commit is contained in:
parent
c58615e15e
commit
0bbf4d38d2
1 changed files with 26 additions and 3 deletions
|
@ -1546,9 +1546,28 @@ public class FragmentCompose extends FragmentEx {
|
|||
|
||||
// Convert data
|
||||
InternetAddress afrom[] = (identity == null ? null : new InternetAddress[]{new InternetAddress(identity.email, identity.name)});
|
||||
InternetAddress ato[] = (TextUtils.isEmpty(to) ? null : InternetAddress.parse(to));
|
||||
InternetAddress acc[] = (TextUtils.isEmpty(cc) ? null : InternetAddress.parse(cc));
|
||||
InternetAddress abcc[] = (TextUtils.isEmpty(bcc) ? null : InternetAddress.parse(bcc));
|
||||
|
||||
InternetAddress ato[] = null;
|
||||
InternetAddress acc[] = null;
|
||||
InternetAddress abcc[] = null;
|
||||
|
||||
if (!TextUtils.isEmpty(to))
|
||||
try {
|
||||
ato = InternetAddress.parse(to);
|
||||
} catch (AddressException ignored) {
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(cc))
|
||||
try {
|
||||
acc = InternetAddress.parse(cc);
|
||||
} catch (AddressException ignored) {
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(bcc))
|
||||
try {
|
||||
abcc = InternetAddress.parse(bcc);
|
||||
} catch (AddressException ignored) {
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(extra))
|
||||
extra = null;
|
||||
|
@ -1645,6 +1664,10 @@ public class FragmentCompose extends FragmentEx {
|
|||
Helper.setViewsEnabled(view, true);
|
||||
getActivity().invalidateOptionsMenu();
|
||||
|
||||
etTo.setText(MessageHelper.getFormattedAddresses(draft.to, true));
|
||||
etCc.setText(MessageHelper.getFormattedAddresses(draft.cc, true));
|
||||
etBcc.setText(MessageHelper.getFormattedAddresses(draft.bcc, true));
|
||||
|
||||
if (action == R.id.action_delete) {
|
||||
autosave = false;
|
||||
getFragmentManager().popBackStack();
|
||||
|
|
Loading…
Reference in a new issue