mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 06:01:12 +00:00
Small improvement
This commit is contained in:
parent
7c224b4119
commit
771ff11ba8
1 changed files with 3 additions and 1 deletions
|
@ -149,15 +149,17 @@ public class DnsBlockList {
|
|||
}
|
||||
|
||||
static Boolean isJunk(Context context, List<Address> addresses) {
|
||||
boolean hasDomain = false;
|
||||
for (Address address : addresses) {
|
||||
String email = ((InternetAddress) address).getAddress();
|
||||
String domain = UriHelper.getEmailDomain(email);
|
||||
if (domain == null)
|
||||
continue;
|
||||
hasDomain = true;
|
||||
if (isJunk(context, domain, false, BLOCK_LISTS))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return (hasDomain ? false : null);
|
||||
}
|
||||
|
||||
private static boolean isJunk(Context context, String host, boolean numeric, List<BlockList> blocklists) {
|
||||
|
|
Loading…
Reference in a new issue