Moved plain only to compose menu

This commit is contained in:
M66B
2019-05-04 20:52:21 +02:00
parent 375a97a724
commit 18d63048c1
14 changed files with 1839 additions and 38 deletions

View File

@@ -355,7 +355,7 @@ public class MessageHelper {
Log.i("Attachments available=" + available);
if (available == 0)
if (identity != null && identity.plain_only)
if (message.plain_only != null && message.plain_only)
imessage.setContent(plainContent, "text/plain; charset=" + Charset.defaultCharset().name());
else
imessage.setContent(alternativePart);
@@ -363,7 +363,7 @@ public class MessageHelper {
Multipart mixedPart = new MimeMultipart("mixed");
BodyPart attachmentPart = new MimeBodyPart();
if (identity != null && identity.plain_only)
if (message.plain_only != null && message.plain_only)
attachmentPart.setContent(plainContent, "text/plain; charset=" + Charset.defaultCharset().name());
else
attachmentPart.setContent(alternativePart);
@@ -762,6 +762,12 @@ public class MessageHelper {
private List<AttachmentPart> attachments = new ArrayList<>();
private ArrayList<String> warnings = new ArrayList<>();
Boolean isPlainOnly() {
if (plain == null && html == null)
return null;
return (html == null);
}
String getHtml(Context context) throws MessagingException {
if (plain == null && html == null) {
warnings.add(context.getString(R.string.title_no_body));