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:
parent
06b34e0597
commit
f500acb5fe
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue