Keep recipients selection

pull/198/head
M66B 3 years ago
parent 6df217e01d
commit 3c2b4c6f70

@ -5193,10 +5193,18 @@ public class FragmentCompose extends FragmentBase {
Log.i("Loaded action id=" + draft.id +
" action=" + getActionName(action) + " encryption=" + needsEncryption);
int[] toPos = new int[]{etTo.getSelectionStart(), etTo.getSelectionEnd()};
int[] ccPos = new int[]{etCc.getSelectionStart(), etCc.getSelectionEnd()};
int[] bccPos = new int[]{etBcc.getSelectionStart(), etBcc.getSelectionEnd()};
etTo.setText(MessageHelper.formatAddressesCompose(draft.to));
etCc.setText(MessageHelper.formatAddressesCompose(draft.cc));
etBcc.setText(MessageHelper.formatAddressesCompose(draft.bcc));
etTo.setSelection(toPos[0], toPos[1]);
etCc.setSelection(ccPos[0], ccPos[1]);
etBcc.setSelection(bccPos[0], bccPos[1]);
Bundle extras = args.getBundle("extras");
boolean show = extras.getBoolean("show");
if (show)
@ -5556,11 +5564,6 @@ public class FragmentCompose extends FragmentBase {
public void run() {
try {
target.requestFocus();
if (target.getId() != R.id.etSubject && target.getId() != R.id.etBody) {
EditText et = (EditText) target;
String text = et.getText().toString();
et.setSelection(text.length());
}
Context context = target.getContext();

Loading…
Cancel
Save