mirror of
https://github.com/bitwarden/android.git
synced 2026-10-23 03:23:53 -05:00
PM-15976 - App crashes when non-english language user tries to create account (#4460)
This commit is contained in:
1 parent
86587258c9
commit
d405a0d04b
1 file changed
+6
@@ -199,6 +199,12 @@ fun createClickableAnnotatedString(
|
||||
mainString.lastIndexOf(text, ignoreCase = true)
|
||||
}
|
||||
}
|
||||
|
||||
// Skip adding the link if the text to highlight is not found in the main string.
|
||||
// This can happen if the highlighted text is correctly translated, but the main string
|
||||
// is not yet translated, causing the startIndex to be -1.
|
||||
if (startIndex < 0) continue
|
||||
|
||||
val endIndex = startIndex + highlight.textToHighlight.length
|
||||
val link = LinkAnnotation.Clickable(
|
||||
tag = highlight.textToHighlight,
|
||||
|
||||
Reference in new issue
Block a user