Select text to be translated

This commit is contained in:
M66B 2022-03-17 08:17:13 +01:00
parent b3f42794ec
commit a834653a43
1 changed files with 2 additions and 0 deletions

View File

@ -2131,6 +2131,7 @@ public class FragmentCompose extends FragmentBase {
new SimpleTask<DeepL.Translation>() {
@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);
}