From e953346b41d707679151ca654699862098cd0b22 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 14 Feb 2022 09:49:06 +0100 Subject: [PATCH] Extra --- .../faircode/email/FragmentOptionsMisc.java | 10 ------- .../java/eu/faircode/email/FragmentSetup.java | 10 +++++++ .../main/res/layout/fragment_options_misc.xml | 14 +--------- app/src/main/res/layout/fragment_setup.xml | 26 +++++++++++++++++-- app/src/main/res/values/strings.xml | 1 + 5 files changed, 36 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index c8654a107c..be6cd21992 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -126,7 +126,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private SwitchCompat swCleanupAttachments; private Button btnCleanup; private TextView tvLastCleanup; - private Button btnMore; private SwitchCompat swProtocol; private SwitchCompat swLogInfo; private SwitchCompat swDebug; @@ -278,7 +277,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc swCleanupAttachments = view.findViewById(R.id.swCleanupAttachments); btnCleanup = view.findViewById(R.id.btnCleanup); tvLastCleanup = view.findViewById(R.id.tvLastCleanup); - btnMore = view.findViewById(R.id.btnMore); swProtocol = view.findViewById(R.id.swProtocol); swLogInfo = view.findViewById(R.id.swLogInfo); swDebug = view.findViewById(R.id.swDebug); @@ -646,14 +644,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc } }); - btnMore.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext()); - lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_SETUP_MORE)); - } - }); - swLogInfo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index 7df5e0470c..9c900151b9 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -113,6 +113,7 @@ public class FragmentSetup extends FragmentBase { private Button btnApp; private Button btnDelete; + private Button btnMore; private Button btnSupport; private Group grpInexactAlarms; @@ -184,6 +185,7 @@ public class FragmentSetup extends FragmentBase { btnApp = view.findViewById(R.id.btnApp); btnDelete = view.findViewById(R.id.btnDelete); + btnMore = view.findViewById(R.id.btnMore); btnSupport = view.findViewById(R.id.btnSupport); grpInexactAlarms = view.findViewById(R.id.grpInexactAlarms); @@ -600,6 +602,14 @@ public class FragmentSetup extends FragmentBase { } }); + btnMore.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext()); + lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_SETUP_MORE)); + } + }); + grpSupport.setVisibility( Helper.hasValidFingerprint(getContext()) || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml index 61b10b272d..e0928448d7 100644 --- a/app/src/main/res/layout/fragment_options_misc.xml +++ b/app/src/main/res/layout/fragment_options_misc.xml @@ -497,18 +497,6 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvCleanupHint" /> -