diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java b/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java
index 789205542c..20c3c4e272 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java
@@ -47,30 +47,32 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
private SwitchCompat swSuggestSent;
private SwitchCompat swSuggestReceived;
private Button btnLocalContacts;
+ private SwitchCompat swSendReminders;
+ private Spinner spSendDelayed;
+
private SwitchCompat swPrefixOnce;
private SwitchCompat swExtendedReply;
private SwitchCompat swQuoteReply;
- private SwitchCompat swPlainOnly;
- private SwitchCompat swFormatFlowed;
private Spinner spSignatureLocation;
- private SwitchCompat swUsenetSignature;
- private SwitchCompat swRemoveSignatures;
private SwitchCompat swResizeImages;
private SwitchCompat swResizeAttachments;
private Spinner spAutoResize;
private TextView tvAutoResize;
- private SwitchCompat swSendReminders;
+
+ private SwitchCompat swPlainOnly;
+ private SwitchCompat swFormatFlowed;
+ private SwitchCompat swUsenetSignature;
+ private SwitchCompat swRemoveSignatures;
private SwitchCompat swReceipt;
private Spinner spReceiptType;
private SwitchCompat swLookupMx;
- private Spinner spSendDelayed;
private final static String[] RESET_OPTIONS = new String[]{
- "keyboard", "suggest_sent", "suggested_received",
- "prefix_once", "extended_reply", "quote_reply",
- "plain_only", "format_flowed", "signature_location", "usenet_signature", "remove_signatures",
+ "keyboard", "suggest_sent", "suggested_received", "send_reminders", "send_delayed",
+ "prefix_once", "extended_reply", "quote_reply", "signature_location",
"resize_images", "resize_attachments", "resize",
- "send_reminders", "receipt_default", "receipt_type", "lookup_mx", "send_delayed"
+ "plain_only", "format_flowed", "usenet_signature", "remove_signatures",
+ "receipt_default", "receipt_type", "lookup_mx"
};
@Override
@@ -87,23 +89,25 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swSuggestSent = view.findViewById(R.id.swSuggestSent);
swSuggestReceived = view.findViewById(R.id.swSuggestReceived);
btnLocalContacts = view.findViewById(R.id.btnLocalContacts);
+ swSendReminders = view.findViewById(R.id.swSendReminders);
+ spSendDelayed = view.findViewById(R.id.spSendDelayed);
+
swPrefixOnce = view.findViewById(R.id.swPrefixOnce);
swExtendedReply = view.findViewById(R.id.swExtendedReply);
swQuoteReply = view.findViewById(R.id.swQuoteReply);
- swPlainOnly = view.findViewById(R.id.swPlainOnly);
- swFormatFlowed = view.findViewById(R.id.swFormatFlowed);
spSignatureLocation = view.findViewById(R.id.spSignatureLocation);
- swUsenetSignature = view.findViewById(R.id.swUsenetSignature);
- swRemoveSignatures = view.findViewById(R.id.swRemoveSignatures);
swResizeImages = view.findViewById(R.id.swResizeImages);
swResizeAttachments = view.findViewById(R.id.swResizeAttachments);
spAutoResize = view.findViewById(R.id.spAutoResize);
tvAutoResize = view.findViewById(R.id.tvAutoResize);
- swSendReminders = view.findViewById(R.id.swSendReminders);
+
+ swPlainOnly = view.findViewById(R.id.swPlainOnly);
+ swFormatFlowed = view.findViewById(R.id.swFormatFlowed);
+ swUsenetSignature = view.findViewById(R.id.swUsenetSignature);
+ swRemoveSignatures = view.findViewById(R.id.swRemoveSignatures);
swReceipt = view.findViewById(R.id.swReceipt);
spReceiptType = view.findViewById(R.id.spReceiptType);
swLookupMx = view.findViewById(R.id.swLookupMx);
- spSendDelayed = view.findViewById(R.id.spSendDelayed);
setOptions();
@@ -140,38 +144,44 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
}
});
- swPrefixOnce.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ swSendReminders.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("prefix_once", checked).apply();
+ prefs.edit().putBoolean("send_reminders", checked).apply();
}
});
- swExtendedReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ spSendDelayed.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
- public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("extended_reply", checked).apply();
+ public void onItemSelected(AdapterView> adapterView, View view, int position, long id) {
+ int[] values = getResources().getIntArray(R.array.sendDelayedValues);
+ prefs.edit().putInt("send_delayed", values[position]).apply();
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView> parent) {
+ prefs.edit().remove("send_delayed").apply();
}
});
- swQuoteReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ swPrefixOnce.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("quote_reply", checked).apply();
+ prefs.edit().putBoolean("prefix_once", checked).apply();
}
});
- swPlainOnly.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ swExtendedReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("plain_only", checked).apply();
+ prefs.edit().putBoolean("extended_reply", checked).apply();
}
});
- swFormatFlowed.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ swQuoteReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("format_flowed", checked).apply();
+ prefs.edit().putBoolean("quote_reply", checked).apply();
}
});
@@ -187,20 +197,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
}
});
- swUsenetSignature.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("usenet_signature", checked).apply();
- }
- });
-
- swRemoveSignatures.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("remove_signatures", checked).apply();
- }
- });
-
swResizeImages.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@@ -231,49 +227,57 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
}
});
- swReceipt.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ swPlainOnly.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("receipt_default", checked).apply();
+ prefs.edit().putBoolean("plain_only", checked).apply();
}
});
- spReceiptType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ swFormatFlowed.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
- public void onItemSelected(AdapterView> adapterView, View view, int position, long id) {
- prefs.edit().putInt("receipt_type", position).apply();
+ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
+ prefs.edit().putBoolean("format_flowed", checked).apply();
}
+ });
+ swUsenetSignature.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
- public void onNothingSelected(AdapterView> parent) {
- prefs.edit().remove("receipt_type").apply();
+ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
+ prefs.edit().putBoolean("usenet_signature", checked).apply();
}
});
- swSendReminders.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ swRemoveSignatures.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("send_reminders", checked).apply();
+ prefs.edit().putBoolean("remove_signatures", checked).apply();
}
});
- swLookupMx.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ swReceipt.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
- prefs.edit().putBoolean("lookup_mx", checked).apply();
+ prefs.edit().putBoolean("receipt_default", checked).apply();
}
});
- spSendDelayed.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ spReceiptType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView> adapterView, View view, int position, long id) {
- int[] values = getResources().getIntArray(R.array.sendDelayedValues);
- prefs.edit().putInt("send_delayed", values[position]).apply();
+ prefs.edit().putInt("receipt_type", position).apply();
}
@Override
public void onNothingSelected(AdapterView> parent) {
- prefs.edit().remove("send_delayed").apply();
+ prefs.edit().remove("receipt_type").apply();
+ }
+ });
+
+ swLookupMx.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
+ prefs.edit().putBoolean("lookup_mx", checked).apply();
}
});
@@ -326,18 +330,23 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swKeyboard.setChecked(prefs.getBoolean("keyboard", true));
swSuggestSent.setChecked(prefs.getBoolean("suggest_sent", true));
swSuggestReceived.setChecked(prefs.getBoolean("suggest_received", false));
+ swSendReminders.setChecked(prefs.getBoolean("send_reminders", true));
+
+ int send_delayed = prefs.getInt("send_delayed", 0);
+ int[] sendDelayedValues = getResources().getIntArray(R.array.sendDelayedValues);
+ for (int pos = 0; pos < sendDelayedValues.length; pos++)
+ if (sendDelayedValues[pos] == send_delayed) {
+ spSendDelayed.setSelection(pos);
+ break;
+ }
+
swPrefixOnce.setChecked(prefs.getBoolean("prefix_once", true));
swExtendedReply.setChecked(prefs.getBoolean("extended_reply", false));
swQuoteReply.setChecked(prefs.getBoolean("quote_reply", true));
- swPlainOnly.setChecked(prefs.getBoolean("plain_only", false));
- swFormatFlowed.setChecked(prefs.getBoolean("format_flowed", false));
int signature_location = prefs.getInt("signature_location", 1);
spSignatureLocation.setSelection(signature_location);
- swUsenetSignature.setChecked(prefs.getBoolean("usenet_signature", false));
- swRemoveSignatures.setChecked(prefs.getBoolean("remove_signatures", false));
-
swResizeImages.setChecked(prefs.getBoolean("resize_images", true));
swResizeAttachments.setChecked(prefs.getBoolean("resize_attachments", true));
@@ -351,18 +360,15 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
}
spAutoResize.setEnabled(swResizeImages.isChecked() || swResizeAttachments.isChecked());
- swSendReminders.setChecked(prefs.getBoolean("send_reminders", true));
+ swPlainOnly.setChecked(prefs.getBoolean("plain_only", false));
+ swFormatFlowed.setChecked(prefs.getBoolean("format_flowed", false));
+ swUsenetSignature.setChecked(prefs.getBoolean("usenet_signature", false));
+ swRemoveSignatures.setChecked(prefs.getBoolean("remove_signatures", false));
+ swReceipt.setChecked(prefs.getBoolean("receipt_default", false));
+
int receipt_type = prefs.getInt("receipt_type", 2);
spReceiptType.setSelection(receipt_type);
- swReceipt.setChecked(prefs.getBoolean("receipt_default", false));
- swLookupMx.setChecked(prefs.getBoolean("lookup_mx", false));
- int send_delayed = prefs.getInt("send_delayed", 0);
- int[] sendDelayedValues = getResources().getIntArray(R.array.sendDelayedValues);
- for (int pos = 0; pos < sendDelayedValues.length; pos++)
- if (sendDelayedValues[pos] == send_delayed) {
- spSendDelayed.setSelection(pos);
- break;
- }
+ swLookupMx.setChecked(prefs.getBoolean("lookup_mx", false));
}
}
diff --git a/app/src/main/res/layout/fragment_options_send.xml b/app/src/main/res/layout/fragment_options_send.xml
index 2740658ca8..dc61870616 100644
--- a/app/src/main/res/layout/fragment_options_send.xml
+++ b/app/src/main/res/layout/fragment_options_send.xml
@@ -101,60 +101,95 @@
app:layout_constraintTop_toBottomOf="@id/swSuggestReceived" />
-
+
+
+ app:layout_constraintTop_toBottomOf="@id/tvSendReminders" />
+
+
+
+
+ app:layout_constraintTop_toBottomOf="@id/swQuoteReply" />
-
-
-
-
-
-
+
+
+
+
+
+
+ app:layout_constraintTop_toBottomOf="@id/swUsenetSignature" />
+
+
-
-
-
-
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c9e7f54116..7441b75665 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -302,6 +302,7 @@
General
List
Conversation
+ Message
Message header
Message body