mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-08 18:13:24 +02:00
Mark messages with failed DKIM, SPF or DMARC authentication
This commit is contained in:
@@ -167,6 +167,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
View.OnClickListener, View.OnLongClickListener, BottomNavigationView.OnNavigationItemSelectedListener {
|
||||
private View view;
|
||||
private View vwColor;
|
||||
private View vwStatus;
|
||||
private ImageView ivExpander;
|
||||
private ImageView ivFlagged;
|
||||
private ImageView ivAvatar;
|
||||
@@ -250,6 +251,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
|
||||
view = itemView.findViewById(R.id.clItem);
|
||||
vwColor = itemView.findViewById(R.id.vwColor);
|
||||
vwStatus = itemView.findViewById(R.id.vwStatus);
|
||||
ivExpander = itemView.findViewById(R.id.ivExpander);
|
||||
ivFlagged = itemView.findViewById(R.id.ivFlagged);
|
||||
ivAvatar = itemView.findViewById(R.id.ivAvatar);
|
||||
@@ -405,6 +407,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
|
||||
private void clear() {
|
||||
vwColor.setVisibility(View.GONE);
|
||||
vwStatus.setVisibility(View.GONE);
|
||||
ivExpander.setVisibility(View.GONE);
|
||||
ivFlagged.setVisibility(View.GONE);
|
||||
ivAvatar.setVisibility(View.GONE);
|
||||
@@ -499,6 +502,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
vwColor.setBackgroundColor(message.accountColor == null ? Color.TRANSPARENT : message.accountColor);
|
||||
vwColor.setVisibility(View.VISIBLE);
|
||||
|
||||
vwStatus.setBackgroundColor(
|
||||
Boolean.FALSE.equals(message.dkim) ||
|
||||
Boolean.FALSE.equals(message.spf) ||
|
||||
Boolean.FALSE.equals(message.dmarc)
|
||||
? colorWarning : Color.TRANSPARENT);
|
||||
vwStatus.setVisibility(View.VISIBLE);
|
||||
|
||||
// Expander
|
||||
boolean expanded = (viewType == ViewType.THREAD && properties.getValue("expanded", message.id));
|
||||
ivExpander.setImageResource(expanded ? R.drawable.baseline_expand_less_24 : R.drawable.baseline_expand_more_24);
|
||||
|
||||
Reference in New Issue
Block a user