This commit is contained in:
Thomas 2022-05-17 08:22:06 +02:00
parent 5d2c83fab3
commit b0405ae854

View file

@ -184,7 +184,7 @@ public class SpannableHelper {
if (matchEnd > content.toString().length()) {
matchEnd = content.toString().length();
}
if (content.toString().length() > matchEnd || matchStart < 0) {
if (content.toString().length() < matchEnd || matchStart < 0) {
continue;
}
final String url = content.toString().substring(matchStart, matchEnd);
@ -210,7 +210,7 @@ public class SpannableHelper {
continue;
}
if (matchStart >= 0 && matchEnd <= content.length() && matchEnd >= matchStart) {
if (matchEnd <= content.length() && matchEnd >= matchStart) {
content.setSpan(new LongClickableSpan() {
@Override
public void onLongClick(View view) {