From c37cd879f8efd0341bc2a49e071b55e415eaa7d5 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 9 Jan 2022 10:51:23 +0100 Subject: [PATCH] Added TLS info button --- .../faircode/email/FragmentOptionsSynchronize.java | 10 +++++++++- .../res/layout/fragment_options_synchronize.xml | 13 ++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsSynchronize.java b/app/src/main/java/eu/faircode/email/FragmentOptionsSynchronize.java index af26da3db8..4a4e5838ec 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsSynchronize.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsSynchronize.java @@ -23,7 +23,6 @@ import android.app.Dialog; import android.app.TimePickerDialog; import android.content.Context; import android.content.SharedPreferences; -import android.os.Build; import android.os.Bundle; import android.text.format.DateFormat; import android.view.LayoutInflater; @@ -92,6 +91,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr private SwitchCompat swCheckAuthentication; private SwitchCompat swCheckTls; + private ImageButton ibCheckTlsInfo; private SwitchCompat swCheckReply; private SwitchCompat swCheckMx; private SwitchCompat swCheckBlocklist; @@ -163,6 +163,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr swCheckAuthentication = view.findViewById(R.id.swCheckAuthentication); swCheckTls = view.findViewById(R.id.swCheckTls); + ibCheckTlsInfo = view.findViewById(R.id.ibCheckTlsInfo); swCheckReply = view.findViewById(R.id.swCheckReply); swCheckMx = view.findViewById(R.id.swCheckMx); swCheckBlocklist = view.findViewById(R.id.swCheckBlocklist); @@ -395,6 +396,13 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr } }); + ibCheckTlsInfo.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.viewFAQ(v.getContext(), 176); + } + }); + swCheckReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { diff --git a/app/src/main/res/layout/fragment_options_synchronize.xml b/app/src/main/res/layout/fragment_options_synchronize.xml index 5ff99588e3..b2962cc490 100644 --- a/app/src/main/res/layout/fragment_options_synchronize.xml +++ b/app/src/main/res/layout/fragment_options_synchronize.xml @@ -770,6 +770,17 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swCheckTls" /> + +