mirror of https://github.com/M66B/FairEmail.git
Added option to disable signature on forward
This commit is contained in:
parent
3d8dc8aaf9
commit
69cd6544e8
|
@ -3391,6 +3391,10 @@ public class FragmentCompose extends FragmentBase {
|
|||
// Signature
|
||||
if ("reply".equals(action) || "reply_all".equals(action))
|
||||
data.draft.signature = prefs.getBoolean("signature_reply", true);
|
||||
else if ("forward".equals(action))
|
||||
data.draft.signature = prefs.getBoolean("signature_forward", true);
|
||||
else
|
||||
data.draft.signature = false;
|
||||
|
||||
// Reply header
|
||||
String s = args.getString("selected");
|
||||
|
|
|
@ -56,6 +56,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
private SwitchCompat swResizeReply;
|
||||
private Spinner spSignatureLocation;
|
||||
private SwitchCompat swSignatureReply;
|
||||
private SwitchCompat swSignatureForward;
|
||||
|
||||
private SwitchCompat swPlainOnly;
|
||||
private SwitchCompat swFormatFlowed;
|
||||
|
@ -68,7 +69,8 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"keyboard", "suggest_sent", "suggested_received", "suggest_frequently",
|
||||
"send_reminders", "send_delayed",
|
||||
"prefix_once", "extended_reply", "quote_reply", "resize_reply", "signature_location", "signature_reply",
|
||||
"prefix_once", "extended_reply", "quote_reply", "resize_reply",
|
||||
"signature_location", "signature_reply", "signature_forward",
|
||||
"plain_only", "format_flowed", "usenet_signature", "remove_signatures",
|
||||
"receipt_default", "receipt_type", "lookup_mx"
|
||||
};
|
||||
|
@ -97,6 +99,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
swResizeReply = view.findViewById(R.id.swResizeReply);
|
||||
spSignatureLocation = view.findViewById(R.id.spSignatureLocation);
|
||||
swSignatureReply = view.findViewById(R.id.swSignatureReply);
|
||||
swSignatureForward = view.findViewById(R.id.swSignatureForward);
|
||||
|
||||
swPlainOnly = view.findViewById(R.id.swPlainOnly);
|
||||
swFormatFlowed = view.findViewById(R.id.swFormatFlowed);
|
||||
|
@ -217,6 +220,13 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
}
|
||||
});
|
||||
|
||||
swSignatureForward.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("signature_forward", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swPlainOnly.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
|
@ -341,6 +351,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
spSignatureLocation.setSelection(signature_location);
|
||||
|
||||
swSignatureReply.setChecked(prefs.getBoolean("signature_reply", true));
|
||||
swSignatureForward.setChecked(prefs.getBoolean("signature_forward", true));
|
||||
|
||||
swPlainOnly.setChecked(prefs.getBoolean("plain_only", false));
|
||||
swFormatFlowed.setChecked(prefs.getBoolean("format_flowed", false));
|
||||
|
|
|
@ -248,6 +248,18 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/spSignatureLocation"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swSignatureForward"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:checked="true"
|
||||
android:text="@string/title_advanced_signature_forward"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swSignatureReply"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvCaptionAdvanced"
|
||||
android:layout_width="0dp"
|
||||
|
@ -258,7 +270,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/swSignatureReply" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/swSignatureForward" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swPlainOnly"
|
||||
|
|
|
@ -291,6 +291,7 @@
|
|||
<string name="title_advanced_resize_reply">Resize images in replied text</string>
|
||||
<string name="title_advanced_signature_location">Signature position</string>
|
||||
<string name="title_advanced_signature_reply">Use signature when replying</string>
|
||||
<string name="title_advanced_signature_forward">Use signature when forwarding</string>
|
||||
<string name="title_advanced_plain_only">Send plain text only by default</string>
|
||||
<string name="title_advanced_flow">\'format flowed\' for plain text</string>
|
||||
<string name="title_advanced_receipt">When requesting a receipt</string>
|
||||
|
|
Loading…
Reference in New Issue