1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Added missing bit of achen.code's patch for issue 2211 (reply below quote)

This commit is contained in:
cketti 2010-08-30 21:27:07 +00:00
parent b1074329e4
commit 7f72da93e0

View File

@ -900,25 +900,44 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
return addresses;
}
/*
* Build the Body that will contain the text of the message. We'll decide where to
* include it later.
*
* @param appendSig If true, append the user's signature to the message.
*/
private String buildText(boolean appendSig)
{
/*
* Build the Body that will contain the text of the message. We'll decide where to
* include it later.
*/
boolean replyAfterQuote = false;
String action = getIntent().getAction();
if (mAccount.isReplyAfterQuote() &&
(ACTION_REPLY.equals(action) || ACTION_REPLY_ALL.equals(action)))
{
replyAfterQuote = true;
}
String text = mMessageContentView.getText().toString();
if (appendSig && mAccount.isSignatureBeforeQuotedText())
// Placing the signature before the quoted text does not make sense if replyAfterQuote is true.
if (!replyAfterQuote && appendSig && mAccount.isSignatureBeforeQuotedText())
{
text = appendSignature(text);
}
if (mQuotedTextBar.getVisibility() == View.VISIBLE)
{
text += "\n" + mQuotedText.getText().toString();
if (replyAfterQuote)
{
text = mQuotedText.getText().toString() + "\n" + text;
}
else
{
text += "\n\n" + mQuotedText.getText().toString();
}
}
if (appendSig && !mAccount.isSignatureBeforeQuotedText())
// Note: If user has selected reply after quote AND signature before quote, ignore the
// latter setting and append the signature at the end.
if (appendSig && (!mAccount.isSignatureBeforeQuotedText() || replyAfterQuote))
{
text = appendSignature(text);
}