Added fail safe

pull/215/head
M66B 7 months ago
parent bc5f8f2e1f
commit b70e9fd085

@ -2572,14 +2572,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
Matcher m = Helper.EMAIL_ADDRESS.matcher(personal);
while (m.find()) {
String e = personal.substring(m.start(), m.end());
if (!e.equalsIgnoreCase(email)) {
int start = ssb.length() - personal.length();
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);
while (m.find())
try {
String e = personal.substring(m.start(), m.end());
if (!e.equalsIgnoreCase(email)) {
int start = ssb.length() - personal.length();
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);
}
} catch (Throwable ex) {
Log.e(ex);
break;
}
}
if (full) {
ssb.append(" <");

Loading…
Cancel
Save