We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8658725 commit d405a0dCopy full SHA for d405a0d
app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/Text.kt
@@ -199,6 +199,12 @@ fun createClickableAnnotatedString(
199
mainString.lastIndexOf(text, ignoreCase = true)
200
}
201
202
+
203
+ // Skip adding the link if the text to highlight is not found in the main string.
204
+ // This can happen if the highlighted text is correctly translated, but the main string
205
+ // is not yet translated, causing the startIndex to be -1.
206
+ if (startIndex < 0) continue
207
208
val endIndex = startIndex + highlight.textToHighlight.length
209
val link = LinkAnnotation.Clickable(
210
tag = highlight.textToHighlight,
0 commit comments