mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 23:12:55 +00:00
Fixed auto pos interaction
This commit is contained in:
parent
26f1e0e12e
commit
8ae6ceac90
1 changed files with 11 additions and 7 deletions
|
@ -6346,12 +6346,6 @@ public class FragmentCompose extends FragmentBase {
|
|||
hint.setSpan(new RelativeSizeSpan(0.7f), start, hint.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
etBody.setHint(hint);
|
||||
|
||||
if (state != State.LOADED) {
|
||||
int pos = getAutoPos(0, etBody.length());
|
||||
if (pos < 0)
|
||||
pos = 0;
|
||||
etBody.setSelection(pos);
|
||||
}
|
||||
grpBody.setVisibility(View.VISIBLE);
|
||||
|
||||
cbSignature.setChecked(draft.signature);
|
||||
|
@ -6403,7 +6397,17 @@ public class FragmentCompose extends FragmentBase {
|
|||
return;
|
||||
state = State.LOADED;
|
||||
|
||||
setFocus(selStart > 0 ? R.id.etBody : null, selStart, selEnd, postShow == null);
|
||||
int s = (selStart == 0 ? -1 : selStart);
|
||||
int e = (selStart == 0 ? -1 : selEnd);
|
||||
|
||||
if (s < 0) {
|
||||
int pos = getAutoPos(0, etBody.length());
|
||||
if (pos < 0)
|
||||
pos = 0;
|
||||
etBody.setSelection(pos);
|
||||
}
|
||||
|
||||
setFocus(s < 0 ? null : R.id.etBody, s, e, postShow == null);
|
||||
if (postShow != null)
|
||||
getMainHandler().post(postShow);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue