Generalize do-no-reply

pull/194/merge
M66B 3 years ago
parent 0e5242c319
commit dc163ff447

@ -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…
Cancel
Save