1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Removed draft scroll

This commit is contained in:
M66B 2020-11-20 14:36:29 +01:00
parent e446dcedad
commit 9cc605342f

View file

@ -4179,7 +4179,7 @@ public class FragmentCompose extends FragmentBase {
Log.i("Draft content=" + draft.content);
if (draft.content && state == State.NONE)
showDraft(draft, false);
showDraft(draft);
tvPlainTextOnly.setVisibility(
draft.plain_only != null && draft.plain_only && !plain_only ? View.VISIBLE : View.GONE);
@ -4839,9 +4839,8 @@ public class FragmentCompose extends FragmentBase {
Bundle extras = args.getBundle("extras");
boolean show = extras.getBoolean("show");
boolean html = extras.containsKey("html");
if (show)
showDraft(draft, html);
showDraft(draft);
bottom_navigation.getMenu().findItem(R.id.action_undo).setVisible(draft.revision > 1);
bottom_navigation.getMenu().findItem(R.id.action_redo).setVisible(draft.revision < draft.revisions);
@ -4862,7 +4861,7 @@ public class FragmentCompose extends FragmentBase {
finish();
} else if (action == R.id.action_undo || action == R.id.action_redo) {
showDraft(draft, false);
showDraft(draft);
} else if (action == R.id.action_save) {
// Do nothing
@ -5018,7 +5017,7 @@ public class FragmentCompose extends FragmentBase {
ref.first().before(div);
}
private void showDraft(final EntityMessage draft, final boolean scroll) {
private void showDraft(final EntityMessage draft) {
Bundle args = new Bundle();
args.putLong("id", draft.id);
args.putBoolean("show_images", show_images);
@ -5113,9 +5112,7 @@ public class FragmentCompose extends FragmentBase {
@Override
protected void onExecuted(Bundle args, Spanned[] text) {
etBody.setText(text[0]);
if (scroll)
etBody.setSelection(text[0] == null ? 0 : text[0].length());
else if (state != State.LOADED)
if (state != State.LOADED)
etBody.setSelection(0);
grpBody.setVisibility(View.VISIBLE);