mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
BIMI: added selector
This commit is contained in:
@@ -942,6 +942,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
boolean outgoing = isOutgoing(message);
|
||||
boolean reverse = (outgoing && viewType != ViewType.THREAD &&
|
||||
(EntityFolder.isOutgoing(type) || viewType == ViewType.SEARCH));
|
||||
String selector = (reverse ? null : message.bimi_selector);
|
||||
Address[] addresses = (reverse ? message.to : message.from);
|
||||
Address[] senders = ContactInfo.fillIn(
|
||||
reverse && !show_recipients ? message.to : message.senders, prefer_contact, only_contact);
|
||||
@@ -1226,7 +1227,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
}
|
||||
|
||||
// Contact info
|
||||
ContactInfo[] info = ContactInfo.getCached(context, message.account, message.folderType, addresses);
|
||||
ContactInfo[] info = ContactInfo.getCached(context,
|
||||
message.account, message.folderType, selector, addresses);
|
||||
if (info == null) {
|
||||
if (taskContactInfo != null)
|
||||
taskContactInfo.cancel(context);
|
||||
@@ -1235,6 +1237,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
aargs.putLong("id", message.id);
|
||||
aargs.putLong("account", message.account);
|
||||
aargs.putString("folderType", message.folderType);
|
||||
aargs.putString("selector", selector);
|
||||
aargs.putSerializable("addresses", addresses);
|
||||
|
||||
taskContactInfo = new SimpleTask<ContactInfo[]>() {
|
||||
@@ -1242,8 +1245,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
protected ContactInfo[] onExecute(Context context, Bundle args) {
|
||||
long account = args.getLong("account");
|
||||
String folderType = args.getString("folderType");
|
||||
String selector = args.getString("selector");
|
||||
Address[] addresses = (Address[]) args.getSerializable("addresses");
|
||||
return ContactInfo.get(context, account, folderType, addresses);
|
||||
return ContactInfo.get(context, account, folderType, selector, addresses);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -5045,6 +5049,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
args.putLong("id", message.id);
|
||||
args.putLong("account", message.account);
|
||||
args.putString("folderType", message.folderType);
|
||||
args.putString("selector", message.bimi_selector);
|
||||
args.putSerializable("addresses", message.from);
|
||||
|
||||
new SimpleTask<ContactInfo[]>() {
|
||||
@@ -5052,8 +5057,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
protected ContactInfo[] onExecute(Context context, Bundle args) {
|
||||
long account = args.getLong("account");
|
||||
String folderType = args.getString("folderType");
|
||||
String selector = args.getString("selector");
|
||||
Address[] addresses = (Address[]) args.getSerializable("addresses");
|
||||
return ContactInfo.get(context, account, folderType, addresses);
|
||||
return ContactInfo.get(context, account, folderType, selector, addresses);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -5704,6 +5710,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
same = false;
|
||||
log("receipt_to changed", next.id);
|
||||
}
|
||||
if (!Objects.equals(prev.bimi_selector, next.bimi_selector)) {
|
||||
same = false;
|
||||
log("bimi_selector changed", next.id);
|
||||
}
|
||||
if (!Objects.equals(prev.dkim, next.dkim)) {
|
||||
same = false;
|
||||
log("dkim changed", next.id);
|
||||
|
||||
Reference in New Issue
Block a user