mirror of https://github.com/M66B/FairEmail.git
Added option to disable quoting reply
This commit is contained in:
parent
b053d4103a
commit
ec9947aad2
|
@ -2517,9 +2517,6 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
}
|
||||
|
||||
if ("reply".equals(action) || "reply_all".equals(action))
|
||||
refText = "<blockquote>" + refText + "</blockquote>";
|
||||
|
||||
// Build reply header
|
||||
StringBuilder sb = new StringBuilder();
|
||||
DateFormat DF = Helper.getDateTimeInstance(context);
|
||||
|
@ -2551,7 +2548,14 @@ public class FragmentCompose extends FragmentBase {
|
|||
sb.append("</p>\n");
|
||||
}
|
||||
|
||||
boolean quote_reply = prefs.getBoolean("quote_reply", true);
|
||||
boolean quote = (quote_reply && ("reply".equals(action) || "reply_all".equals(action)));
|
||||
if (quote)
|
||||
sb.append("<blockquote>");
|
||||
sb.append(refText);
|
||||
if (quote)
|
||||
sb.append("</blockquote>");
|
||||
|
||||
Helper.writeText(data.draft.getRefFile(context), sb.toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
private Button btnLocalContacts;
|
||||
private SwitchCompat swPrefixOnce;
|
||||
private SwitchCompat swExtendedReply;
|
||||
private SwitchCompat swQuoteReply;
|
||||
private SwitchCompat swPlainOnly;
|
||||
private SwitchCompat swUsenetSignature;
|
||||
private SwitchCompat swAutoResize;
|
||||
|
@ -60,7 +61,9 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
private Spinner spSendDelayed;
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"keyboard", "suggest_sent", "suggested_received", "prefix_once", "extended_reply", "plain_only", "usenet_signature",
|
||||
"keyboard", "suggest_sent", "suggested_received",
|
||||
"prefix_once", "extended_reply", "quote_reply",
|
||||
"plain_only", "usenet_signature",
|
||||
"autoresize", "encrypt_default", "receipt_default", "resize", "lookup_mx", "send_delayed"
|
||||
};
|
||||
|
||||
|
@ -80,6 +83,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
btnLocalContacts = view.findViewById(R.id.btnLocalContacts);
|
||||
swPrefixOnce = view.findViewById(R.id.swPrefixOnce);
|
||||
swExtendedReply = view.findViewById(R.id.swExtendedReply);
|
||||
swQuoteReply = view.findViewById(R.id.swQuoteReply);
|
||||
swPlainOnly = view.findViewById(R.id.swPlainOnly);
|
||||
swUsenetSignature = view.findViewById(R.id.swUsenetSignature);
|
||||
swAutoResize = view.findViewById(R.id.swAutoResize);
|
||||
|
@ -139,6 +143,13 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
}
|
||||
});
|
||||
|
||||
swQuoteReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("quote_reply", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swPlainOnly.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
|
@ -260,6 +271,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
swSuggestReceived.setChecked(prefs.getBoolean("suggest_received", false));
|
||||
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));
|
||||
swUsenetSignature.setChecked(prefs.getBoolean("usenet_signature", false));
|
||||
|
||||
|
|
|
@ -119,6 +119,18 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/swPrefixOnce"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swQuoteReply"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:checked="true"
|
||||
android:text="@string/title_advanced_quote_reply"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swExtendedReply"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swPlainOnly"
|
||||
android:layout_width="0dp"
|
||||
|
@ -127,7 +139,7 @@
|
|||
android:text="@string/title_advanced_plain_only"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swExtendedReply"
|
||||
app:layout_constraintTop_toBottomOf="@id/swQuoteReply"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
|
|
|
@ -229,7 +229,8 @@
|
|||
<string name="title_advanced_suggest_sent">Suggest addresses found in sent messages</string>
|
||||
<string name="title_advanced_suggest_received">Suggest addresses found in received messages</string>
|
||||
<string name="title_advanced_prefix_once">Prefix subject only once on replying or forwarding</string>
|
||||
<string name="title_advanced_extended_reply">Use extended reply header</string>
|
||||
<string name="title_advanced_extended_reply">Use extended reply/forward header</string>
|
||||
<string name="title_advanced_quote_reply">Quote replied text</string>
|
||||
<string name="title_advanced_plain_only">Send plain text only by default</string>
|
||||
<string name="title_advanced_usenet_signature">Usenet signature convention</string>
|
||||
<string name="title_advanced_autoresize">Automatically resize attached and embedded images</string>
|
||||
|
|
Loading…
Reference in New Issue