1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 02:37:16 +00:00

Moved send setting

This commit is contained in:
M66B 2021-08-19 21:44:21 +02:00
parent de5d621d81
commit 2e7c612979
2 changed files with 24 additions and 24 deletions

View file

@ -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));

View file

@ -183,6 +183,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swSuggestFrequently" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swPrefixOnce"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_prefix_once"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnLocalContacts"
app:switchPadding="12dp" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvAltReFws"
android:layout_width="wrap_content"
@ -192,7 +204,7 @@
android:text="@string/title_advanced_alt_re_fwd"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnLocalContacts" />
app:layout_constraintTop_toBottomOf="@id/swPrefixOnce" />
<RadioGroup
android:id="@+id/rgRe"
@ -363,18 +375,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvComposeFont" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swPrefixOnce"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_prefix_once"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/spComposeFont"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swSeparateReply"
android:layout_width="0dp"
@ -383,7 +383,7 @@
android:text="@string/title_advanced_separate_reply"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swPrefixOnce"
app:layout_constraintTop_toBottomOf="@id/spComposeFont"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat