Skip warning for email in name when same email address

This commit is contained in:
M66B 2024-05-28 08:31:39 +02:00
parent 9f861fda42
commit bc5f8f2e1f
1 changed files with 6 additions and 3 deletions

View File

@ -2573,10 +2573,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
Matcher m = Helper.EMAIL_ADDRESS.matcher(personal); Matcher m = Helper.EMAIL_ADDRESS.matcher(personal);
while (m.find()) { while (m.find()) {
String e = personal.substring(m.start(), m.end());
if (!e.equalsIgnoreCase(email)) {
int start = ssb.length() - personal.length(); int start = ssb.length() - personal.length();
ssb.setSpan(new StyleSpan(Typeface.BOLD), start + m.start(), start + m.end(), 0); ssb.setSpan(new StyleSpan(Typeface.BOLD), start + m.start(), start + m.end(), 0);
ssb.setSpan(new ForegroundColorSpan(colorError), start + m.start(), start + m.end(), 0); ssb.setSpan(new ForegroundColorSpan(colorError), start + m.start(), start + m.end(), 0);
} }
}
if (full) { if (full) {
ssb.append(" <"); ssb.append(" <");