mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
astyle
This commit is contained in:
parent
4260dc75d3
commit
215ada2e77
@ -80,8 +80,7 @@ public class TextBodyBuilder {
|
||||
if (mInsertSeparator) {
|
||||
text = "<br clear=\"all\">" + text;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
quotedHtmlContent.setInsertionLocation(
|
||||
InsertableHtmlContent.InsertionLocation.BEFORE_QUOTE);
|
||||
if (mInsertSeparator) {
|
||||
@ -103,8 +102,7 @@ public class TextBodyBuilder {
|
||||
composedMessageOffset = quotedHtmlContent.getInsertionPoint();
|
||||
text = quotedHtmlContent.toString();
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// There is no text to quote so simply append the signature if available
|
||||
if (mAppendSignature) {
|
||||
text += getSignature();
|
||||
@ -176,8 +174,7 @@ public class TextBodyBuilder {
|
||||
text += getSignature();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// There is no text to quote so simply append the signature if available
|
||||
if (mAppendSignature) {
|
||||
// Append signature to the text/reply
|
||||
|
@ -11,8 +11,7 @@ import com.fsck.k9.activity.InsertableHtmlContent;
|
||||
|
||||
class TestingTextBodyBuilder extends TextBodyBuilder {
|
||||
|
||||
public TestingTextBodyBuilder(
|
||||
boolean includeQuotedText,
|
||||
public TestingTextBodyBuilder(boolean includeQuotedText,
|
||||
boolean isDraft,
|
||||
QuoteStyle quoteStyle,
|
||||
boolean replyAfterQuote,
|
||||
@ -24,8 +23,7 @@ class TestingTextBodyBuilder extends TextBodyBuilder {
|
||||
|
||||
if (isDraft || includeQuotedText) {
|
||||
this.setIncludeQuotedText(true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.setIncludeQuotedText(false);
|
||||
}
|
||||
|
||||
@ -36,8 +34,7 @@ class TestingTextBodyBuilder extends TextBodyBuilder {
|
||||
|
||||
if (quoteStyle == QuoteStyle.PREFIX && replyAfterQuote) {
|
||||
this.setReplyAfterQuote(true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.setReplyAfterQuote(false);
|
||||
}
|
||||
|
||||
@ -64,14 +61,12 @@ public class TextBodyBuilderTest {
|
||||
public static QuoteStyle[] QUOTESTYLES = {QuoteStyle.PREFIX, QuoteStyle.HEADER};
|
||||
|
||||
@Theory
|
||||
public void testBuildTextPlain(
|
||||
boolean includeQuotedText,
|
||||
public void testBuildTextPlain(boolean includeQuotedText,
|
||||
QuoteStyle quoteStyle,
|
||||
boolean isReplyAfterQuote,
|
||||
boolean isSignatureUse,
|
||||
boolean isSignatureBeforeQuotedText,
|
||||
boolean isDraft
|
||||
) {
|
||||
boolean isDraft) {
|
||||
|
||||
String expectedText;
|
||||
int expectedMessageLength;
|
||||
@ -184,14 +179,12 @@ public class TextBodyBuilderTest {
|
||||
}
|
||||
|
||||
@Theory
|
||||
public void testBuildTextHtml(
|
||||
boolean includeQuotedText,
|
||||
public void testBuildTextHtml(boolean includeQuotedText,
|
||||
QuoteStyle quoteStyle,
|
||||
boolean isReplyAfterQuote,
|
||||
boolean isSignatureUse,
|
||||
boolean isSignatureBeforeQuotedText,
|
||||
boolean isDraft
|
||||
) {
|
||||
boolean isDraft) {
|
||||
String expectedText;
|
||||
int expectedMessageLength;
|
||||
int expectedMessagePosition = 0;
|
||||
@ -227,8 +220,7 @@ public class TextBodyBuilderTest {
|
||||
expectedText,
|
||||
expectedText + quotedContent);
|
||||
expectedText += quotedContent;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
expectedHtmlContent = makeExpectedHtmlContent(expectedText, quotedContent,
|
||||
0,
|
||||
true,
|
||||
@ -259,8 +251,7 @@ public class TextBodyBuilderTest {
|
||||
expectedText,
|
||||
expectedText + quotedContent);
|
||||
expectedText += quotedContent;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
expectedHtmlContent = makeExpectedHtmlContent(expectedText, quotedContent,
|
||||
0,
|
||||
true,
|
||||
@ -281,8 +272,7 @@ public class TextBodyBuilderTest {
|
||||
if (!isDraft && isSignatureUse) {
|
||||
if (!includeQuotedText) {
|
||||
expectedText += "\r\n" + "signature";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
expectedSignature = "<html>\r\nsignature</html>";
|
||||
}
|
||||
}
|
||||
@ -299,8 +289,7 @@ public class TextBodyBuilderTest {
|
||||
expectedText,
|
||||
expectedText + expectedSignature + quotedContent);
|
||||
expectedText += expectedSignature + quotedContent;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
expectedHtmlContent = makeExpectedHtmlContent(expectedText, quotedContent,
|
||||
0,
|
||||
true,
|
||||
|
Loading…
Reference in New Issue
Block a user