1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Small improvement

This commit is contained in:
M66B 2021-05-12 07:40:46 +02:00
parent 24373b4be9
commit af543dde63

View file

@ -5615,12 +5615,15 @@ public class FragmentCompose extends FragmentBase {
if (target == null)
return;
int s = (start < end ? start : end);
int e = (start < end ? end : start);
getMainHandler().post(new Runnable() {
@Override
public void run() {
try {
if (target instanceof EditText && start >= 0)
((EditText) target).setSelection(start, end < 0 ? start : end);
if (target instanceof EditText && s >= 0)
((EditText) target).setSelection(s, e < 0 ? s : e);
target.requestFocus();