Doesn't try to link phone numbers smaller than 6 chars

This commit is contained in:
Vitor Pamplona 2023-01-22 19:07:06 -03:00
parent a366809319
commit 0c2fd3adc0

View File

@ -62,7 +62,7 @@ fun RichTextViewer(content: String, tags: List<List<String>>?, note: Note, accou
}
} else if (Patterns.EMAIL_ADDRESS.matcher(word).matches()) {
ClickableEmail(word)
} else if (Patterns.PHONE.matcher(word).matches()) {
} else if (Patterns.PHONE.matcher(word).matches() && word.length > 6) {
ClickablePhone(word)
} else if (noProtocolUrlValidator.matcher(word).matches()) {
UrlPreview("https://$word", word)