mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 13:44:40 +00:00
Improved re/fwd once, default enabled
This commit is contained in:
parent
a4d212fa6d
commit
ec5709bdc8
3 changed files with 13 additions and 12 deletions
|
@ -226,7 +226,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
super.onCreate(savedInstanceState);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
prefix_once = prefs.getBoolean("prefix_once", false);
|
||||
prefix_once = prefs.getBoolean("prefix_once", true);
|
||||
monospaced = prefs.getBoolean("monospaced", false);
|
||||
style = prefs.getBoolean("style_toolbar", true);
|
||||
}
|
||||
|
@ -2072,17 +2072,17 @@ public class FragmentCompose extends FragmentBase {
|
|||
String subject = (ref.subject == null ? "" : ref.subject);
|
||||
if ("reply".equals(action) || "reply_all".equals(action) ||
|
||||
"participation".equals(action)) {
|
||||
String re = context.getString(R.string.title_subject_reply, "");
|
||||
if (!prefix_once || !subject.startsWith(re))
|
||||
draft.subject = context.getString(R.string.title_subject_reply, subject);
|
||||
else
|
||||
draft.subject = ref.subject;
|
||||
if (prefix_once) {
|
||||
String re = context.getString(R.string.title_subject_reply, "");
|
||||
subject = subject.replace(re.trim(), "").trim();
|
||||
}
|
||||
draft.subject = context.getString(R.string.title_subject_reply, subject);
|
||||
} else if ("forward".equals(action)) {
|
||||
String fwd = context.getString(R.string.title_subject_forward, "");
|
||||
if (!prefix_once || !subject.startsWith(fwd.trim()))
|
||||
draft.subject = context.getString(R.string.title_subject_forward, subject);
|
||||
else
|
||||
draft.subject = ref.subject;
|
||||
if (prefix_once) {
|
||||
String fwd = context.getString(R.string.title_subject_forward, "");
|
||||
subject = subject.replace(fwd.trim(), "").trim();
|
||||
}
|
||||
draft.subject = context.getString(R.string.title_subject_forward, subject);
|
||||
} else if ("editasnew".equals(action)) {
|
||||
draft.subject = ref.subject;
|
||||
if (ref.content) {
|
||||
|
|
|
@ -195,7 +195,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
|||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
||||
swKeyboard.setChecked(prefs.getBoolean("keyboard", true));
|
||||
swPrefixOnce.setChecked(prefs.getBoolean("prefix_once", false));
|
||||
swPrefixOnce.setChecked(prefs.getBoolean("prefix_once", true));
|
||||
swPlainOnly.setChecked(prefs.getBoolean("plain_only", false));
|
||||
|
||||
swAutoResize.setChecked(prefs.getBoolean("autoresize", true));
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
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"
|
||||
|
|
Loading…
Reference in a new issue