diff --git a/FAQ.md b/FAQ.md index c64df662a4..bf30864262 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1626,7 +1626,7 @@ and [SPF](https://en.wikipedia.org/wiki/Sender_Policy_Framework) authorization i However, FairEmail will show a small warning flag when DKIM, SPF or [DMARC](https://en.wikipedia.org/wiki/DMARC) authentication failed on the receiving server. -You can enable/disable this in the miscellaneous settings. +You can enable/disable this in the behavior settings.
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java b/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java index 277b1f9b60..aba8f759bd 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java @@ -45,11 +45,12 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe private SwitchCompat swCollapse; private SwitchCompat swAutoRead; private SwitchCompat swAutoMove; + private SwitchCompat swAuthentication; private SwitchCompat swDisableTracking; private final static String[] RESET_OPTIONS = new String[]{ "pull", "autoscroll", "swipenav", "doubletap", "autoexpand", "autoclose", "autonext", - "collapse", "autoread", "automove", "disable_tracking" + "collapse", "autoread", "automove", "authentication", "disable_tracking" }; @Override @@ -72,6 +73,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe swCollapse = view.findViewById(R.id.swCollapse); swAutoRead = view.findViewById(R.id.swAutoRead); swAutoMove = view.findViewById(R.id.swAutoMove); + swAuthentication = view.findViewById(R.id.swAuthentication); swDisableTracking = view.findViewById(R.id.swDisableTracking); setOptions(); @@ -151,6 +153,13 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe } }); + swAuthentication.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { + prefs.edit().putBoolean("authentication", checked).apply(); + } + }); + swDisableTracking.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { @@ -213,6 +222,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe swCollapse.setChecked(prefs.getBoolean("collapse", false)); swAutoRead.setChecked(prefs.getBoolean("autoread", false)); swAutoMove.setChecked(!prefs.getBoolean("automove", false)); + swAuthentication.setChecked(prefs.getBoolean("authentication", true)); swDisableTracking.setChecked(prefs.getBoolean("disable_tracking", true)); } } diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index 879bacb8af..bf3453d3d3 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -50,7 +50,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private TextView tvSubscriptionPro; private SwitchCompat swSubscribedOnly; private SwitchCompat swEnglish; - private SwitchCompat swAuthentication; private SwitchCompat swWatchdog; private SwitchCompat swUpdates; private SwitchCompat swCrashReports; @@ -64,7 +63,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private Group grpDebug; private final static String[] RESET_OPTIONS = new String[]{ - "badge", "subscriptions", "subscribed_only", "english", "authentication", "watchdog", "updates", "crash_reports", "debug" + "badge", "subscriptions", "subscribed_only", "english", "watchdog", "updates", "crash_reports", "debug" }; private final static String[] RESET_QUESTIONS = new String[]{ @@ -86,7 +85,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc tvSubscriptionPro = view.findViewById(R.id.tvSubscriptionPro); swSubscribedOnly = view.findViewById(R.id.swSubscribedOnly); swEnglish = view.findViewById(R.id.swEnglish); - swAuthentication = view.findViewById(R.id.swAuthentication); swWatchdog = view.findViewById(R.id.swWatchdog); swUpdates = view.findViewById(R.id.swUpdates); swCrashReports = view.findViewById(R.id.swCrashReports); @@ -138,13 +136,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc } }); - swAuthentication.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { - @Override - public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { - prefs.edit().putBoolean("authentication", checked).apply(); - } - }); - swWatchdog.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { @@ -243,7 +234,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc swSubscribedOnly.setChecked(prefs.getBoolean("subscribed_only", false)); swEnglish.setChecked(prefs.getBoolean("english", false)); - swAuthentication.setChecked(prefs.getBoolean("authentication", true)); swWatchdog.setChecked(prefs.getBoolean("watchdog", true)); swUpdates.setChecked(prefs.getBoolean("updates", true)); swUpdates.setVisibility(Helper.isPlayStoreInstall(getContext()) ? View.GONE : View.VISIBLE); diff --git a/app/src/main/res/layout/fragment_options_behavior.xml b/app/src/main/res/layout/fragment_options_behavior.xml index 5f34aa7803..7a9d2d4efe 100644 --- a/app/src/main/res/layout/fragment_options_behavior.xml +++ b/app/src/main/res/layout/fragment_options_behavior.xml @@ -158,6 +158,30 @@ app:layout_constraintTop_toBottomOf="@id/swAutoRead" app:switchPadding="12dp" /> + + + + diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml index 6f625ce480..b0182e9f91 100644 --- a/app/src/main/res/layout/fragment_options_misc.xml +++ b/app/src/main/res/layout/fragment_options_misc.xml @@ -107,29 +107,6 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swEnglish" /> - - - - Automatically go to next conversation on close conversation Automatically mark messages read on moving messages Confirm moving messages + Show a warning when the receiving server could not authenticate the message Automatically recognize and disable tracking images Show message preview in notifications @@ -242,7 +243,6 @@ Manage folder subscriptions Synchronize subscribed folders only Force English language - Show a warning when the receiving server could not authenticate the message Periodically check if FairEmail is still active Check for updates Send error reports