Added re/fwd option title

This commit is contained in:
M66B 2021-07-28 14:47:19 +02:00
parent 57efa3c206
commit 764273db68
3 changed files with 19 additions and 3 deletions

View File

@ -449,13 +449,17 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
String re2 = getString(R.string.title_subject_reply_alt, "");
((RadioButton) view.findViewById(R.id.rbRe1)).setText(re1);
((RadioButton) view.findViewById(R.id.rbRe2)).setText(re2);
rgRe.setVisibility(Objects.equals(re1, re2) ? View.GONE : View.VISIBLE);
boolean re = !Objects.equals(re1, re2);
for (int i = 0; i < rgRe.getChildCount(); i++)
rgRe.getChildAt(i).setEnabled(re);
String fwd1 = getString(R.string.title_subject_forward, "");
String fwd2 = getString(R.string.title_subject_forward_alt, "");
((RadioButton) view.findViewById(R.id.rbFwd1)).setText(fwd1);
((RadioButton) view.findViewById(R.id.rbFwd2)).setText(fwd2);
rgFwd.setVisibility(Objects.equals(fwd1, fwd2) ? View.GONE : View.VISIBLE);
boolean fwd = !Objects.equals(fwd1, fwd2);
for (int i = 0; i < rgFwd.getChildCount(); i++)
rgFwd.getChildAt(i).setEnabled(fwd);
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);

View File

@ -183,6 +183,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swSuggestFrequently" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvAltReFws"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginEnd="48dp"
android:text="@string/title_advanced_alt_re_fwd"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnLocalContacts" />
<RadioGroup
android:id="@+id/rgRe"
android:layout_width="0dp"
@ -191,7 +202,7 @@
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnLocalContacts">
app:layout_constraintTop_toBottomOf="@id/tvAltReFws">
<RadioButton
android:id="@+id/rbRe1"

View File

@ -342,6 +342,7 @@
<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_suggest_frequently">Sort suggested addresses on frequency of use</string>
<string name="title_advanced_alt_re_fwd">Alternative reply/forward prefix</string>
<string name="title_advanced_send_reminders">Show reminders</string>
<string name="title_advanced_send_delayed">Delay sending messages</string>
<string name="title_advanced_send_pending">Show non-obtrusive send delayed icon</string>