Sort on sender: default address format

pull/209/head
M66B 3 years ago
parent 4553966262
commit 9c759e310f

@ -7065,9 +7065,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
this.check_mx = prefs.getBoolean("check_mx", false); this.check_mx = prefs.getBoolean("check_mx", false);
this.check_blocklist = prefs.getBoolean("check_blocklist", false); this.check_blocklist = prefs.getBoolean("check_blocklist", false);
this.email_format = ("sender".equals(sort) this.email_format = MessageHelper.getAddressFormat(context);
? MessageHelper.AddressFormat.EMAIL_NAME
: MessageHelper.getAddressFormat(context));
this.prefer_contact = prefs.getBoolean("prefer_contact", false); this.prefer_contact = prefs.getBoolean("prefer_contact", false);
this.only_contact = prefs.getBoolean("only_contact", false); this.only_contact = prefs.getBoolean("only_contact", false);
this.distinguish_contacts = prefs.getBoolean("distinguish_contacts", false); this.distinguish_contacts = prefs.getBoolean("distinguish_contacts", false);
@ -7737,9 +7735,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
void setSort(String sort) { void setSort(String sort) {
if (!sort.equals(this.sort)) { if (!sort.equals(this.sort)) {
this.sort = sort; this.sort = sort;
this.email_format = ("sender".equals(sort)
? MessageHelper.AddressFormat.EMAIL_NAME
: MessageHelper.getAddressFormat(context));
properties.refresh(); properties.refresh();
// Needed to redraw item decorators / add/remove size // Needed to redraw item decorators / add/remove size
} }

Loading…
Cancel
Save