mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-06 21:05:38 +01:00
Small improvement
This commit is contained in:
@@ -1337,6 +1337,8 @@ public class EntityRule {
|
||||
boolean regex = false;
|
||||
if (block_domain) {
|
||||
String domain = UriHelper.getEmailDomain(sender);
|
||||
if (domain != null)
|
||||
domain = domain.trim();
|
||||
if (!TextUtils.isEmpty(domain) && !domains.contains(domain)) {
|
||||
String parent = UriHelper.getParentDomain(context, domain);
|
||||
if (parent != null)
|
||||
|
||||
@@ -342,6 +342,8 @@ public class FragmentDialogJunk extends FragmentDialogBase {
|
||||
for (Address from : froms) {
|
||||
String email = ((InternetAddress) from).getAddress();
|
||||
String domain = UriHelper.getEmailDomain(email);
|
||||
if (domain != null)
|
||||
domain = domain.trim();
|
||||
if (TextUtils.isEmpty(domain) || domains.contains(domain))
|
||||
continue;
|
||||
String parent = UriHelper.getParentDomain(context, domain);
|
||||
|
||||
Reference in New Issue
Block a user