Prevent compose scroll

pull/187/head
M66B 5 years ago
parent 074a2d953e
commit 213a5f944e

@ -5075,9 +5075,9 @@ public class FragmentCompose extends FragmentBase {
@Override @Override
protected void onExecuted(Bundle args, Spanned[] text) { protected void onExecuted(Bundle args, Spanned[] text) {
etBody.setText(text[0]); etBody.setText(text[0]);
if (scroll && text[0] != null) if (scroll)
etBody.setSelection(text[0].length()); etBody.setSelection(text[0] == null ? 0 : text[0].length());
else else if (state != State.LOADED)
etBody.setSelection(0); etBody.setSelection(0);
grpBody.setVisibility(View.VISIBLE); grpBody.setVisibility(View.VISIBLE);
@ -5097,6 +5097,8 @@ public class FragmentCompose extends FragmentBase {
setBodyPadding(); setBodyPadding();
if (state == State.LOADED)
return;
state = State.LOADED; state = State.LOADED;
final Context context = getContext(); final Context context = getContext();

Loading…
Cancel
Save