Merge pull request #4419 from k9mail/fix_reply_to_encrypted_message
Fix reply to encrypted message that couldn't be decrypted
This commit is contained in:
commit
ad39ac2c5f
1 changed files with 13 additions and 1 deletions
|
@ -4,8 +4,12 @@ package com.fsck.k9.mailstore;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.fsck.k9.mail.Body;
|
||||
import com.fsck.k9.mail.Message;
|
||||
import com.fsck.k9.mail.MessagingException;
|
||||
import com.fsck.k9.mail.Part;
|
||||
import com.fsck.k9.mail.internet.MimeBodyPart;
|
||||
import com.fsck.k9.mail.internet.TextBody;
|
||||
|
||||
|
||||
public class MessageViewInfo {
|
||||
|
@ -50,7 +54,15 @@ public class MessageViewInfo {
|
|||
}
|
||||
|
||||
public static MessageViewInfo createWithErrorState(Message message, boolean isMessageIncomplete) {
|
||||
return new MessageViewInfo(message, isMessageIncomplete, null, null, false, null, null, null, null, null, null);
|
||||
try {
|
||||
Body emptyBody = new TextBody("");
|
||||
Part emptyPart = new MimeBodyPart(emptyBody, "text/plain");
|
||||
String subject = message.getSubject();
|
||||
return new MessageViewInfo(message, isMessageIncomplete, emptyPart, subject, false, null, null, null, null,
|
||||
null, null);
|
||||
} catch (MessagingException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static MessageViewInfo createForMetadataOnly(Message message, boolean isMessageIncomplete) {
|
||||
|
|
Loading…
Reference in a new issue