From a08687b70e2e3ace85f144ff8ac9f41361e23320 Mon Sep 17 00:00:00 2001 From: Koji Arai Date: Fri, 2 May 2014 08:28:42 +0900 Subject: [PATCH] Use local variable for more readability. --- src/com/fsck/k9/activity/MessageCompose.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageCompose.java b/src/com/fsck/k9/activity/MessageCompose.java index 7db2e3bce..d6ceb13d0 100644 --- a/src/com/fsck/k9/activity/MessageCompose.java +++ b/src/com/fsck/k9/activity/MessageCompose.java @@ -1352,11 +1352,10 @@ public class MessageCompose extends K9Activity implements OnClickListener, * original message. */ private TextBody buildText(boolean isDraft, SimpleMessageFormat messageFormat) { - TextBodyBuilder textBodyBuilder = - new TextBodyBuilder( - mMessageContentView.getText().toString(), - mIdentity.getSignatureUse() ? mSignatureView.getCharacters() : null - ); + String messageText = mMessageContentView.getText().toString(); + String signatureText = mIdentity.getSignatureUse() ? mSignatureView.getCharacters() : null; + + TextBodyBuilder textBodyBuilder = new TextBodyBuilder(messageText, signatureText); /* * 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 * opens a saved draft. */ - if (isDraft || mQuotedTextMode == QuotedTextMode.SHOW) { - textBodyBuilder.setIncludeQuotedText(true); - } - else { - textBodyBuilder.setIncludeQuotedText(false); - } + boolean includeQuotedText = (isDraft || mQuotedTextMode == QuotedTextMode.SHOW); + textBodyBuilder.setIncludeQuotedText(includeQuotedText); + if (!isDraft) { textBodyBuilder.setAppendSignature(true); }