Insert name as subject on inserting answer

This commit is contained in:
M66B 2020-06-25 12:21:11 +02:00
parent 2325e617f3
commit db6b2410c9
1 changed files with 6 additions and 0 deletions

View File

@ -2708,8 +2708,12 @@ public class FragmentCompose extends FragmentBase {
}
private void onAnswerSelected(Bundle args) {
String name = args.getString("name");
String answer = args.getString("answer");
if (etSubject.getText().length() == 0)
etSubject.setText(name);
InternetAddress[] to = null;
try {
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);
}
}, null);
etBody.getText().insert(etBody.getSelectionStart(), spanned);
}
@ -4959,6 +4964,7 @@ public class FragmentCompose extends FragmentBase {
@Override
public void onClick(DialogInterface dialog, int which) {
EntityAnswer answer = adapter.getItem(which);
getArguments().putString("name", answer.name);
getArguments().putString("answer", answer.text);
sendResult(RESULT_OK);