mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 10:47:28 +00:00
Small improvement
This commit is contained in:
parent
6cf2fae5fb
commit
e40372a9ed
1 changed files with 10 additions and 6 deletions
|
@ -755,7 +755,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
args.putBoolean("plain", plain);
|
||||
args.putString("body", HtmlHelper.toHtml(etBody.getText()));
|
||||
|
||||
new SimpleTask<Spanned>() {
|
||||
new SimpleTask<String>() {
|
||||
@Override
|
||||
protected void onPreExecute(Bundle args) {
|
||||
ibReferenceDelete.setEnabled(false);
|
||||
|
@ -769,7 +769,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Spanned onExecute(Context context, Bundle args) throws Throwable {
|
||||
protected String onExecute(Context context, Bundle args) throws Throwable {
|
||||
long id = args.getLong("id");
|
||||
boolean plain = args.getBoolean("plain");
|
||||
String body = args.getString("body");
|
||||
|
@ -784,13 +784,13 @@ public class FragmentCompose extends FragmentBase {
|
|||
html = HtmlHelper.sanitize(context, ref, true);
|
||||
refFile.delete();
|
||||
|
||||
return HtmlHelper.fromHtml(body + html);
|
||||
return body + html;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, Spanned body) {
|
||||
etBody.setText(body);
|
||||
protected void onExecuted(Bundle args, String html) {
|
||||
Bundle extras = new Bundle();
|
||||
extras.putString("html", html);
|
||||
extras.putBoolean("show", true);
|
||||
onAction(R.id.action_save, extras);
|
||||
}
|
||||
|
@ -1959,7 +1959,11 @@ public class FragmentCompose extends FragmentBase {
|
|||
args.putString("cc", etCc.getText().toString().trim());
|
||||
args.putString("bcc", etBcc.getText().toString().trim());
|
||||
args.putString("subject", etSubject.getText().toString().trim());
|
||||
args.putString("body", HtmlHelper.toHtml(etBody.getText()));
|
||||
if (extras.containsKey("html")) {
|
||||
args.putString("body", extras.getString("html"));
|
||||
extras.remove("html");
|
||||
} else
|
||||
args.putString("body", HtmlHelper.toHtml(etBody.getText()));
|
||||
args.putBoolean("empty", isEmpty());
|
||||
args.putBundle("extras", extras);
|
||||
|
||||
|
|
Loading…
Reference in a new issue