mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Small improvement
This commit is contained in:
parent
24373b4be9
commit
af543dde63
1 changed files with 5 additions and 2 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue