mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-19 07:23:47 +02:00
Defer send MX check
This commit is contained in:
@@ -6322,14 +6322,6 @@ public class FragmentCompose extends FragmentBase {
|
||||
args.putString("address_error", ex.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
checkMx(ato, context);
|
||||
checkMx(acc, context);
|
||||
checkMx(abcc, context);
|
||||
} catch (UnknownHostException ex) {
|
||||
args.putString("mx_error", ex.getMessage());
|
||||
}
|
||||
|
||||
if (draft.to == null && draft.cc == null && draft.bcc == null &&
|
||||
(identity == null || (identity.cc == null && identity.bcc == null)))
|
||||
args.putBoolean("remind_to", true);
|
||||
@@ -6554,6 +6546,22 @@ public class FragmentCompose extends FragmentBase {
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
if (action == R.id.action_check)
|
||||
try {
|
||||
InternetAddress[] ato = MessageHelper.dedup(MessageHelper.parseAddresses(context, to));
|
||||
InternetAddress[] acc = MessageHelper.dedup(MessageHelper.parseAddresses(context, cc));
|
||||
InternetAddress[] abcc = MessageHelper.dedup(MessageHelper.parseAddresses(context, bcc));
|
||||
|
||||
try {
|
||||
checkMx(ato, context);
|
||||
checkMx(acc, context);
|
||||
checkMx(abcc, context);
|
||||
} catch (UnknownHostException ex) {
|
||||
args.putString("mx_error", ex.getMessage());
|
||||
}
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
|
||||
args.putBoolean("dirty", dirty);
|
||||
if (dirty)
|
||||
ServiceSynchronize.eval(context, "compose/action");
|
||||
|
||||
Reference in New Issue
Block a user