From a834653a43efec82c004f531aff9feb274dc0e36 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 17 Mar 2022 08:17:13 +0100 Subject: [PATCH] Select text to be translated --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index ed6c795239..323f98bd52 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -2131,6 +2131,7 @@ public class FragmentCompose extends FragmentBase { new SimpleTask() { @Override protected void onPreExecute(Bundle args) { + etBody.setSelection(paragraph.first, paragraph.second); ToastEx.makeText(context, R.string.title_translating, Toast.LENGTH_SHORT).show(); } @@ -2200,6 +2201,7 @@ public class FragmentCompose extends FragmentBase { @Override protected void onException(Bundle args, Throwable ex) { + etBody.setSelection(paragraph.second); Throwable exex = new Throwable("DeepL", ex); Log.unexpectedError(getParentFragmentManager(), exex, false); }