mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-10 11:35:11 -05:00
more refactor about quoted text
This commit is contained in:
parent
68850b1dc9
commit
4260dc75d3
@ -1365,13 +1365,24 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
* opens a saved draft.
|
||||
*/
|
||||
boolean includeQuotedText = (isDraft || mQuotedTextMode == QuotedTextMode.SHOW);
|
||||
textBodyBuilder.setIncludeQuotedText(includeQuotedText);
|
||||
boolean isReplyAfterQuote = (mQuoteStyle == QuoteStyle.PREFIX && mAccount.isReplyAfterQuote());
|
||||
|
||||
textBodyBuilder.setIncludeQuotedText(false);
|
||||
if (includeQuotedText) {
|
||||
if (messageFormat == SimpleMessageFormat.HTML && mQuotedHtmlContent != null) {
|
||||
textBodyBuilder.setIncludeQuotedText(true);
|
||||
textBodyBuilder.setQuotedTextHtml(mQuotedHtmlContent);
|
||||
textBodyBuilder.setReplyAfterQuote(isReplyAfterQuote);
|
||||
}
|
||||
if (messageFormat == SimpleMessageFormat.TEXT) {
|
||||
textBodyBuilder.setIncludeQuotedText(true);
|
||||
textBodyBuilder.setQuotedText(mQuotedText.getText().toString());
|
||||
textBodyBuilder.setReplyAfterQuote(isReplyAfterQuote);
|
||||
}
|
||||
}
|
||||
|
||||
textBodyBuilder.setInsertSeparator(!isDraft);
|
||||
|
||||
boolean isReplyAfterQuote = (mQuoteStyle == QuoteStyle.PREFIX && mAccount.isReplyAfterQuote());
|
||||
textBodyBuilder.setReplyAfterQuote(isReplyAfterQuote);
|
||||
|
||||
boolean useSignature = (!isDraft && mIdentity.getSignatureUse());
|
||||
if (useSignature) {
|
||||
textBodyBuilder.setAppendSignature(true);
|
||||
@ -1384,16 +1395,9 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
|
||||
TextBody body;
|
||||
if (messageFormat == SimpleMessageFormat.HTML) {
|
||||
if (mQuotedHtmlContent == null) {
|
||||
textBodyBuilder.setIncludeQuotedText(false);
|
||||
}
|
||||
else {
|
||||
textBodyBuilder.setQuotedTextHtml(mQuotedHtmlContent);
|
||||
}
|
||||
body = textBodyBuilder.buildTextHtml();
|
||||
}
|
||||
else {
|
||||
textBodyBuilder.setQuotedText(mQuotedText.getText().toString());
|
||||
body = textBodyBuilder.buildTextPlain();
|
||||
}
|
||||
return body;
|
||||
|
Loading…
Reference in New Issue
Block a user