Small improvement

pull/184/head
M66B 4 years ago
parent 4d4deb91c7
commit e4b279918e

@ -107,6 +107,7 @@ import biweekly.ICalendar;
public class MessageHelper { public class MessageHelper {
private boolean ensuredEnvelope = false; private boolean ensuredEnvelope = false;
private boolean ensuredEnvelopeAll = false;
private boolean ensuredBody = false; private boolean ensuredBody = false;
private MimeMessage imessage; private MimeMessage imessage;
@ -2237,13 +2238,17 @@ public class MessageHelper {
} }
private void ensureMessage(boolean body, boolean all) throws MessagingException { private void ensureMessage(boolean body, boolean all) throws MessagingException {
if (body ? ensuredBody : ensuredEnvelope) if (body ? ensuredBody : ensuredEnvelopeAll || (ensuredEnvelope && !all))
return; return;
if (body) if (body)
ensuredBody = true; ensuredBody = true;
else else {
ensuredEnvelope = true; if (all)
ensuredEnvelopeAll = true;
else
ensuredEnvelope = true;
}
Log.i("Ensure body=" + body + " all=" + all); Log.i("Ensure body=" + body + " all=" + all);

Loading…
Cancel
Save