Repository: thundernest/k-9
Issue: Body in decrypted mails empty by reply or forwarding

### Expected behavior
If I click reply or forward, the body of the original mail should be filled with the whole original text and maybe attachments by forwarding .

### Actual behavior
There is only the header (Mailadress and so on) and the subject line of the original mail

### Steps to reproduce
1. Receive a encrypted mail
2. Decrypt this mail
3. Click reply or forward
4. See there is no quote and no attachment (by forwarding) 

### Environment
K-9 Mail version: 5.400

Android version: 7.0

Account type (IMAP, POP3, WebDAV/Exchange): IMAP


Changed files:
k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java, k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfo.java, k9mail/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java

diff --git a/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfo.java b/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfo.java
index 6d6daccf7..bda32a1fc 100644
--- a/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfo.java
+++ b/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfo.java
@@ -37,10 +37,10 @@ public class MessageViewInfo {
         this.extraAttachments = extraAttachments;
     }
 
-    static MessageViewInfo createWithExtractedContent(Message message, boolean isMessageIncomplete,
+    static MessageViewInfo createWithExtractedContent(Message message, Part rootPart, boolean isMessageIncomplete,
             String text, List<AttachmentViewInfo> attachments, AttachmentResolver attachmentResolver) {
         return new MessageViewInfo(
-                message, isMessageIncomplete, message, text, attachments, null, attachmentResolver, null,
+                message, isMessageIncomplete, rootPart, text, attachments, null, attachmentResolver, null,
                 Collections.<AttachmentViewInfo>emptyList());
     }
 
diff --git a/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java b/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java
index 975b56686..9956c2b9b 100644
--- a/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java
+++ b/k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java
@@ -124,7 +124,7 @@ public class MessageViewInfoExtractor {
                 !message.isSet(Flag.X_DOWNLOADED_FULL) || MessageExtractor.hasMissingParts(message);
 
         return MessageViewInfo.createWithExtractedContent(
-                message, isMessageIncomplete, viewable.html, attachmentInfos, attachmentResolver);
+                message, contentPart, isMessageIncomplete, viewable.html, attachmentInfos, attachmentResolver);
     }
 
     private ViewableExtractedText extractViewableAndAttachments(List<Part> parts,
diff --git a/k9mail/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java b/k9mail/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java
index a74910994..eae6f7aca 100644
--- a/k9mail/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java
+++ b/k9mail/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java
@@ -406,6 +406,8 @@ public class MessageViewInfoExtractorTest {
 
         assertEquals("<pre class=\\"k9mail\\">text</pre>", messageViewInfo.text);
         assertSame(annotation, messageViewInfo.cryptoResultAnnotation);
+        assertSame(message, messageViewInfo.message);
+        assertSame(message, messageViewInfo.rootPart);
         assertTrue(messageViewInfo.attachments.isEmpty());
         assertTrue(messageViewInfo.extraAttachments.isEmpty());
     }
@@ -427,6 +429,8 @@ public class MessageViewInfoExtractorTest {
 
         assertEquals("<pre class=\\"k9mail\\">replacement text</pre>", messageViewInfo.text);
         assertSame(annotation, messageViewInfo.cryptoResultAnnotation);
+        assertSame(message, messageViewInfo.message);
+        assertSame(replacementPart, messageViewInfo.rootPart);
         assertTrue(messageViewInfo.attachments.isEmpty());
         assertTrue(messageViewInfo.extraAttachments.isEmpty());
     }