1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-15 14:05:05 -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; 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) private String buildText(boolean appendSig)
{ {
/* boolean replyAfterQuote = false;
* Build the Body that will contain the text of the message. We'll decide where to String action = getIntent().getAction();
* include it later. if (mAccount.isReplyAfterQuote() &&
*/ (ACTION_REPLY.equals(action) || ACTION_REPLY_ALL.equals(action)))
{
replyAfterQuote = true;
}
String text = mMessageContentView.getText().toString(); 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); text = appendSignature(text);
} }
if (mQuotedTextBar.getVisibility() == View.VISIBLE) 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); text = appendSignature(text);
} }