From 8c7dd5dc3e1ff94eb985f111d4808601d6e4334d Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 17 Dec 2019 12:22:29 +0100 Subject: [PATCH] Small behavior improvement --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 42e938bd49..15daa2dd0e 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -1438,13 +1438,17 @@ public class FragmentAccount extends FragmentBase { break; case REQUEST_SAVE: if (resultCode == RESULT_OK) { + final boolean save = (btnSave.getVisibility() == View.VISIBLE); new Handler().post(new Runnable() { @Override public void run() { - scroll.smoothScrollTo(0, btnSave.getBottom()); + scroll.smoothScrollTo(0, (save ? btnSave : btnCheck).getBottom()); } }); - onSave(false); + if (save) + onSave(false); + else + onCheck(); } else if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) getParentFragmentManager().popBackStack(); break;