Insert name as subject on inserting answer

pull/182/head
M66B 5 years ago
parent 2325e617f3
commit db6b2410c9

@ -2708,8 +2708,12 @@ public class FragmentCompose extends FragmentBase {
} }
private void onAnswerSelected(Bundle args) { private void onAnswerSelected(Bundle args) {
String name = args.getString("name");
String answer = args.getString("answer"); String answer = args.getString("answer");
if (etSubject.getText().length() == 0)
etSubject.setText(name);
InternetAddress[] to = null; InternetAddress[] to = null;
try { try {
to = InternetAddress.parseHeader(etTo.getText().toString(), false); to = InternetAddress.parseHeader(etTo.getText().toString(), false);
@ -2724,6 +2728,7 @@ public class FragmentCompose extends FragmentBase {
return ImageHelper.decodeImage(getContext(), working, source, true, zoom, etBody); return ImageHelper.decodeImage(getContext(), working, source, true, zoom, etBody);
} }
}, null); }, null);
etBody.getText().insert(etBody.getSelectionStart(), spanned); etBody.getText().insert(etBody.getSelectionStart(), spanned);
} }
@ -4959,6 +4964,7 @@ public class FragmentCompose extends FragmentBase {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
EntityAnswer answer = adapter.getItem(which); EntityAnswer answer = adapter.getItem(which);
getArguments().putString("name", answer.name);
getArguments().putString("answer", answer.text); getArguments().putString("answer", answer.text);
sendResult(RESULT_OK); sendResult(RESULT_OK);

Loading…
Cancel
Save