From e7701deec7c284c2529421472e3424e282c10a89 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 16 Feb 2021 18:48:00 +0100 Subject: [PATCH] Fixed manual setup state --- .../main/java/eu/faircode/email/FragmentSetup.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index f117e3e4e4..75ae0c3a7c 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -98,9 +98,12 @@ public class FragmentSetup extends FragmentBase { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { setSubtitle(R.string.title_setup); - FragmentActivity activity = getActivity(); - if (activity != null) - manual = activity.getIntent().getBooleanExtra("manual", false); + if (savedInstanceState == null) { + FragmentActivity activity = getActivity(); + if (activity != null) + manual = activity.getIntent().getBooleanExtra("manual", false); + } else + manual = savedInstanceState.getBoolean("fair:manual"); textColorPrimary = Helper.resolveColor(getContext(), android.R.attr.textColorPrimary); colorWarning = Helper.resolveColor(getContext(), R.attr.colorWarning); @@ -237,8 +240,6 @@ public class FragmentSetup extends FragmentBase { } }); - if (savedInstanceState != null) - manual = savedInstanceState.getBoolean("fair:manual"); ibManual.setImageLevel(manual ? 0 /* less */ : 1 /* more */); grpManual.setVisibility(manual ? View.VISIBLE : View.GONE);