Use local variable for more readability.

This commit is contained in:
Koji Arai 2014-05-02 08:28:42 +09:00
parent 6155a65f65
commit a08687b70e
1 changed files with 7 additions and 11 deletions

View File

@ -1352,11 +1352,10 @@ public class MessageCompose extends K9Activity implements OnClickListener,
* original message. * original message.
*/ */
private TextBody buildText(boolean isDraft, SimpleMessageFormat messageFormat) { private TextBody buildText(boolean isDraft, SimpleMessageFormat messageFormat) {
TextBodyBuilder textBodyBuilder = String messageText = mMessageContentView.getText().toString();
new TextBodyBuilder( String signatureText = mIdentity.getSignatureUse() ? mSignatureView.getCharacters() : null;
mMessageContentView.getText().toString(),
mIdentity.getSignatureUse() ? mSignatureView.getCharacters() : null TextBodyBuilder textBodyBuilder = new TextBodyBuilder(messageText, signatureText);
);
/* /*
* Find out if we need to include the original message as quoted text. * Find out if we need to include the original message as quoted text.
@ -1366,12 +1365,9 @@ public class MessageCompose extends K9Activity implements OnClickListener,
* That's so the user is able to "un-hide" the quoted text if (s)he * That's so the user is able to "un-hide" the quoted text if (s)he
* opens a saved draft. * opens a saved draft.
*/ */
if (isDraft || mQuotedTextMode == QuotedTextMode.SHOW) { boolean includeQuotedText = (isDraft || mQuotedTextMode == QuotedTextMode.SHOW);
textBodyBuilder.setIncludeQuotedText(true); textBodyBuilder.setIncludeQuotedText(includeQuotedText);
}
else {
textBodyBuilder.setIncludeQuotedText(false);
}
if (!isDraft) { if (!isDraft) {
textBodyBuilder.setAppendSignature(true); textBodyBuilder.setAppendSignature(true);
} }