mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
adapt to product code
This commit is contained in:
parent
215ada2e77
commit
0a09060ed7
@ -16,30 +16,28 @@ class TestingTextBodyBuilder extends TextBodyBuilder {
|
||||
QuoteStyle quoteStyle,
|
||||
boolean replyAfterQuote,
|
||||
boolean signatureBeforeQuotedText,
|
||||
boolean signatureUse,
|
||||
String messageContent,
|
||||
String signature) {
|
||||
super(messageContent);
|
||||
boolean useSignature,
|
||||
String messageText,
|
||||
String signatureText) {
|
||||
super(messageText);
|
||||
|
||||
if (isDraft || includeQuotedText) {
|
||||
includeQuotedText = (isDraft || includeQuotedText);
|
||||
if (includeQuotedText) {
|
||||
this.setIncludeQuotedText(true);
|
||||
this.setReplyAfterQuote(quoteStyle == QuoteStyle.PREFIX && replyAfterQuote);
|
||||
} else {
|
||||
this.setIncludeQuotedText(false);
|
||||
}
|
||||
|
||||
this.setAppendSignature(!isDraft);
|
||||
this.setInsertSeparator(!isDraft);
|
||||
|
||||
useSignature = (!isDraft && useSignature);
|
||||
if (useSignature) {
|
||||
this.setAppendSignature(true);
|
||||
this.setSignature(signatureText);
|
||||
this.setSignatureBeforeQuotedText(signatureBeforeQuotedText);
|
||||
|
||||
if (quoteStyle == QuoteStyle.PREFIX && replyAfterQuote) {
|
||||
this.setReplyAfterQuote(true);
|
||||
} else {
|
||||
this.setReplyAfterQuote(false);
|
||||
}
|
||||
|
||||
if (signatureUse) {
|
||||
this.setSignature(signature);
|
||||
this.setAppendSignature(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,8 +126,8 @@ public class TextBodyBuilderTest {
|
||||
}
|
||||
|
||||
String quotedText = "quoted text";
|
||||
String messageContent = "message content";
|
||||
String signature = "signature";
|
||||
String messageText = "message content";
|
||||
String signatureText = "signature";
|
||||
|
||||
TestingTextBodyBuilder textBodyBuilder = new TestingTextBodyBuilder(
|
||||
includeQuotedText,
|
||||
@ -138,8 +136,8 @@ public class TextBodyBuilderTest {
|
||||
isReplyAfterQuote,
|
||||
isSignatureBeforeQuotedText,
|
||||
isSignatureUse,
|
||||
messageContent,
|
||||
signature
|
||||
messageText,
|
||||
signatureText
|
||||
);
|
||||
textBodyBuilder.setQuotedText(quotedText);
|
||||
TextBody textBody = textBodyBuilder.buildTextPlain();
|
||||
@ -303,8 +301,8 @@ public class TextBodyBuilderTest {
|
||||
|
||||
String quotedText = "quoted text";
|
||||
insertableHtmlContent.setQuotedContent(new StringBuilder(quotedText));
|
||||
String messageContent = "message content";
|
||||
String signature = "signature";
|
||||
String messageText = "message content";
|
||||
String signatureText = "signature";
|
||||
|
||||
TestingTextBodyBuilder textBodyBuilder = new TestingTextBodyBuilder(
|
||||
includeQuotedText,
|
||||
@ -313,8 +311,8 @@ public class TextBodyBuilderTest {
|
||||
isReplyAfterQuote,
|
||||
isSignatureBeforeQuotedText,
|
||||
isSignatureUse,
|
||||
messageContent,
|
||||
signature
|
||||
messageText,
|
||||
signatureText
|
||||
);
|
||||
textBodyBuilder.setQuotedTextHtml(insertableHtmlContent);
|
||||
TextBody textBody = textBodyBuilder.buildTextHtml();
|
||||
|
Loading…
Reference in New Issue
Block a user