1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

Small behavior improvement

This commit is contained in:
M66B 2022-10-03 15:48:47 +02:00
parent 06b34e0597
commit f500acb5fe

View file

@ -2407,6 +2407,10 @@ public class FragmentCompose extends FragmentBase {
if (languages == null)
languages = new ArrayList<>();
int s = etBody.getSelectionStart();
if (s > 0 && s == etBody.length() && etBody.getText().charAt(s - 1) == '\n')
etBody.setSelection(s - 1, s - 1);
Pair<Integer, Integer> paragraph = StyleHelper.getParagraph(etBody);
boolean canTranslate = (DeepL.canTranslate(context) && paragraph != null);