From 2e7c6129793039dfcaf9b77034aa6e6f1281749c Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 19 Aug 2021 21:44:21 +0200 Subject: [PATCH] Moved send setting --- .../faircode/email/FragmentOptionsSend.java | 20 ++++++------- .../main/res/layout/fragment_options_send.xml | 28 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java b/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java index 0494067566..8877ac80ab 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java @@ -58,6 +58,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc private SwitchCompat swSuggestReceived; private SwitchCompat swSuggestFrequently; private Button btnLocalContacts; + private SwitchCompat swPrefixOnce; private RadioGroup rgRe; private RadioGroup rgFwd; private SwitchCompat swSendReminders; @@ -65,7 +66,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc private SwitchCompat swSendPending; private Spinner spComposeFont; - private SwitchCompat swPrefixOnce; private SwitchCompat swSeparateReply; private SwitchCompat swExtendedReply; private SwitchCompat swWriteBelow; @@ -118,6 +118,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc swSuggestReceived = view.findViewById(R.id.swSuggestReceived); swSuggestFrequently = view.findViewById(R.id.swSuggestFrequently); btnLocalContacts = view.findViewById(R.id.btnLocalContacts); + swPrefixOnce = view.findViewById(R.id.swPrefixOnce); rgRe = view.findViewById(R.id.rgRe); rgFwd = view.findViewById(R.id.rgFwd); swSendReminders = view.findViewById(R.id.swSendReminders); @@ -125,7 +126,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc swSendPending = view.findViewById(R.id.swSendPending); spComposeFont = view.findViewById(R.id.spComposeFont); - swPrefixOnce = view.findViewById(R.id.swPrefixOnce); swSeparateReply = view.findViewById(R.id.swSeparateReply); swExtendedReply = view.findViewById(R.id.swExtendedReply); swWriteBelow = view.findViewById(R.id.swWriteBelow); @@ -221,6 +221,13 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc } }); + swPrefixOnce.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { + prefs.edit().putBoolean("prefix_once", checked).apply(); + } + }); + rgRe.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { @@ -279,13 +286,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc } }); - swPrefixOnce.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { - @Override - public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { - prefs.edit().putBoolean("prefix_once", checked).apply(); - } - }); - swSeparateReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { @@ -513,6 +513,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc swSuggestFrequently.setChecked(prefs.getBoolean("suggest_frequently", false)); swSuggestFrequently.setEnabled(swSuggestSent.isChecked() || swSuggestReceived.isChecked()); + swPrefixOnce.setChecked(prefs.getBoolean("prefix_once", true)); rgRe.check(prefs.getBoolean("alt_re", false) ? R.id.rbRe2 : R.id.rbRe1); rgFwd.check(prefs.getBoolean("alt_fwd", false) ? R.id.rbFwd2 : R.id.rbFwd1); @@ -537,7 +538,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc break; } - swPrefixOnce.setChecked(prefs.getBoolean("prefix_once", true)); swSeparateReply.setChecked(prefs.getBoolean("separate_reply", false)); swExtendedReply.setChecked(prefs.getBoolean("extended_reply", false)); swWriteBelow.setChecked(prefs.getBoolean("write_below", false)); diff --git a/app/src/main/res/layout/fragment_options_send.xml b/app/src/main/res/layout/fragment_options_send.xml index 24d2b6044b..73252f04c6 100644 --- a/app/src/main/res/layout/fragment_options_send.xml +++ b/app/src/main/res/layout/fragment_options_send.xml @@ -183,6 +183,18 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swSuggestFrequently" /> + + + app:layout_constraintTop_toBottomOf="@id/swPrefixOnce" /> - -