Rework where we wrap message content

This commit is contained in:
Philip Whitehouse 2017-01-08 13:19:14 +00:00
parent 1af2f23f50
commit fe6f6caa5f
2 changed files with 5 additions and 2 deletions

View file

@ -12,6 +12,7 @@ import android.widget.ImageButton;
import com.fsck.k9.FontSizes;
import com.fsck.k9.R;
import com.fsck.k9.activity.MessageCompose;
import com.fsck.k9.helper.HtmlConverter;
import com.fsck.k9.mailstore.AttachmentResolver;
import com.fsck.k9.message.QuotedTextMode;
import com.fsck.k9.message.SimpleMessageFormat;
@ -119,7 +120,9 @@ public class QuotedMessageMvpView {
}
public void setQuotedHtml(String quotedContent, AttachmentResolver attachmentResolver) {
mQuotedHTML.displayHtmlContentWithInlineAttachments(quotedContent, attachmentResolver, null);
mQuotedHTML.displayHtmlContentWithInlineAttachments(
HtmlConverter.wrapMessageContent(quotedContent),
attachmentResolver, null);
}
public void setQuotedText(String quotedText) {

View file

@ -118,7 +118,7 @@ public class MessageWebView extends RigidWebView {
public void displayHtmlContentWithInlineAttachments(@NonNull String htmlText,
@Nullable AttachmentResolver attachmentResolver, @Nullable OnPageFinishedListener onPageFinishedListener) {
setWebViewClient(attachmentResolver, onPageFinishedListener);
setHtmlContent(HtmlConverter.wrapMessageContent(htmlText));
setHtmlContent(htmlText);
}
private void setWebViewClient(@Nullable AttachmentResolver attachmentResolver,