Consider from/to self as incoming

pull/198/head
M66B 4 years ago
parent 59724581ed
commit e356995464

@ -2969,11 +2969,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
else { else {
if (message.identityEmail == null) if (message.identityEmail == null)
return false; return false;
if (message.from == null)
if (message.from != null && message.from.length == 1 &&
message.to != null && message.to.length == 1 &&
message.identityEmail.equalsIgnoreCase(((InternetAddress) message.from[0]).getAddress()) &&
message.identityEmail.equalsIgnoreCase(((InternetAddress) message.to[0]).getAddress()))
return false; return false;
for (Address from : message.from)
if (message.identityEmail.equalsIgnoreCase(((InternetAddress) from).getAddress())) if (message.from != null)
return true; for (Address from : message.from)
if (message.identityEmail.equalsIgnoreCase(((InternetAddress) from).getAddress()))
return true;
return false; return false;
} }
} }

Loading…
Cancel
Save