From 7baf24b77c88989d427037a97d3c9b91d8112099 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 15 Aug 2020 10:29:59 +0200 Subject: [PATCH] Small behavior improvement --- .../main/java/eu/faircode/email/FragmentOptionsDisplay.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java b/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java index fb7c5dc5a3..2fd2645c36 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java @@ -936,6 +936,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer private SwitchCompat swDark; private SwitchCompat swBlack; private SwitchCompat swSystem; + private TextView tvSystem; private void eval() { int checkedId = rgTheme.getCheckedRadioButtonId(); @@ -949,6 +950,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer swDark.setEnabled(dark); swBlack.setEnabled(colored && swDark.isChecked()); swSystem.setEnabled(dark && !swDark.isChecked()); + tvSystem.setEnabled(swSystem.isEnabled() && swSystem.isChecked()); } @NonNull @@ -961,6 +963,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer swDark = dview.findViewById(R.id.swDark); swBlack = dview.findViewById(R.id.swBlack); swSystem = dview.findViewById(R.id.swSystem); + tvSystem = dview.findViewById(R.id.tvSystem); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); String theme = prefs.getString("theme", "light");