mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 21:55:13 +00:00
Generalize do-no-reply
This commit is contained in:
parent
0e5242c319
commit
dc163ff447
1 changed files with 9 additions and 5 deletions
|
@ -326,6 +326,10 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
private static ExecutorService executor = Helper.getBackgroundExecutor(1, "encrypt");
|
||||
|
||||
private static final List<String> DO_NOT_REPLY = Collections.unmodifiableList(Arrays.asList(
|
||||
"noreply", "no-reply", "do-not-reply"
|
||||
));
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -5796,11 +5800,11 @@ public class FragmentCompose extends FragmentBase {
|
|||
String username = UriHelper.getEmailUser(email);
|
||||
if (!TextUtils.isEmpty(username)) {
|
||||
username = username.toLowerCase(Locale.ROOT);
|
||||
if (username.contains("noreply") ||
|
||||
username.contains("no-reply")) {
|
||||
noreply = true;
|
||||
break;
|
||||
}
|
||||
for (String value : DO_NOT_REPLY)
|
||||
if (username.contains(value)) {
|
||||
noreply = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
args.putBoolean("remind_noreply", noreply);
|
||||
|
|
Loading…
Reference in a new issue