mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
. Fixed issue 419
. Moved signature to the bottom of the message body view so that it is not editable TODO: Add signature location preference / settings
This commit is contained in:
parent
182bc74755
commit
536133daf1
@ -480,6 +480,13 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
|
||||
mMessageContentView.requestFocus();
|
||||
}
|
||||
|
||||
if (!ACTION_EDIT_DRAFT.equals(action)) {
|
||||
String signature = getSignature();
|
||||
if (signature!=null) {
|
||||
mMessageContentView.setText(signature);
|
||||
}
|
||||
}
|
||||
|
||||
addAddress(mBccView, new Address(mAccount.getAlwaysBcc(), ""));
|
||||
updateTitle();
|
||||
}
|
||||
@ -597,12 +604,9 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
|
||||
*/
|
||||
|
||||
String text = mMessageContentView.getText().toString();
|
||||
if (!this.mSourceMessageProcessed) {
|
||||
text = appendSignature(text);
|
||||
}
|
||||
|
||||
|
||||
String action = getIntent().getAction();
|
||||
if (mQuotedTextBar.getVisibility() == View.VISIBLE) {
|
||||
String action = getIntent().getAction();
|
||||
String quotedText = null;
|
||||
Part part = MimeUtility.findFirstPartByMimeType(mSourceMessage,
|
||||
"text/plain");
|
||||
@ -632,6 +636,17 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Place holder for when we implement the signature location preference / setting
|
||||
*
|
||||
if (!ACTION_EDIT_DRAFT.equals(action)) {
|
||||
String signature = getSignature();
|
||||
if (signature!=null) {
|
||||
text += signature;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
TextBody body = new TextBody(text);
|
||||
|
||||
if (mAttachments.getChildCount() > 0) {
|
||||
@ -672,15 +687,16 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
|
||||
return message;
|
||||
}
|
||||
|
||||
private String appendSignature (String text) {
|
||||
private String getSignature() {
|
||||
String mSignature;
|
||||
mSignature = mAccount.getSignature();
|
||||
|
||||
if (mSignature != null && ! mSignature.contentEquals("")){
|
||||
text += "\n-- \n" + mAccount.getSignature();
|
||||
}
|
||||
|
||||
return text;
|
||||
if (mSignature != null && !mSignature.contentEquals("")) {
|
||||
return "\n--\n" + mAccount.getSignature();
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user