Added option to show recipient for sent messages

This commit is contained in:
M66B
2023-10-24 07:46:20 +02:00
parent 8c42e336a4
commit 68427ca6f1
8 changed files with 39 additions and 10 deletions

View File

@@ -141,6 +141,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
private SwitchCompat swOnlyContact;
private SwitchCompat swDistinguishContacts;
private SwitchCompat swShowRecipients;
private SwitchCompat swReverseAddresses;
private Spinner spFontSizeSender;
private Spinner spSenderEllipsize;
@@ -211,7 +212,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
"highlight_unread", "highlight_color", "color_stripe", "color_stripe_wide",
"avatars", "bimi", "gravatars", "libravatars", "favicons", "favicons_partial", "favicons_manifest", "generated_icons", "identicons",
"circular", "saturation", "brightness", "threshold",
"email_format", "prefer_contact", "only_contact", "distinguish_contacts", "show_recipients",
"email_format", "prefer_contact", "only_contact", "distinguish_contacts", "show_recipients", "reverse_addresses",
"font_size_sender", "sender_ellipsize",
"subject_top", "subject_italic", "highlight_subject", "font_size_subject", "subject_ellipsize",
"keywords_header", "labels_header", "flags", "flags_background",
@@ -314,6 +315,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swOnlyContact = view.findViewById(R.id.swOnlyContact);
swDistinguishContacts = view.findViewById(R.id.swDistinguishContacts);
swShowRecipients = view.findViewById(R.id.swShowRecipients);
swReverseAddresses = view.findViewById(R.id.swReverseAddresses);
spFontSizeSender = view.findViewById(R.id.spFontSizeSender);
spSenderEllipsize = view.findViewById(R.id.spSenderEllipsize);
@@ -1017,6 +1019,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
}
});
swReverseAddresses.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("reverse_addresses", checked).apply();
}
});
spFontSizeSender.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
@@ -1574,6 +1583,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swOnlyContact.setChecked(prefs.getBoolean("only_contact", false));
swDistinguishContacts.setChecked(prefs.getBoolean("distinguish_contacts", false));
swShowRecipients.setChecked(prefs.getBoolean("show_recipients", false));
swReverseAddresses.setChecked(prefs.getBoolean("reverse_addresses", true));
swSubjectTop.setChecked(prefs.getBoolean("subject_top", false));
swSubjectItalic.setChecked(prefs.getBoolean("subject_italic", true));