Is there any bug in the new `LinkAnnotation` API ...
# compose
v
Is there any bug in the new
LinkAnnotation
API I see that the whole text line is clickable, even if it does not have any text Code:
Copy code
val link = when (pattern) {
    is LinkPattern -> LinkAnnotation.Url(
        url = pattern.annotationValue(match),
        styles = TextLinkStyles(pattern.spanStyle),
        linkInteractionListener = { link ->
            if (link !is LinkAnnotation.Url) return@Url
            onAnnotationClick(TextAnnotation.Link(link.url))
        }
    )
    is MentionPattern -> LinkAnnotation.Clickable(
        tag = pattern.annotationValue(match),
        styles = TextLinkStyles(pattern.spanStyle),
        linkInteractionListener = { link ->
            if (link !is LinkAnnotation.Clickable) return@Clickable
            onAnnotationClick(TextAnnotation.Mention(link.tag))
        }
    )
}
withLink(link) {
    append(pattern.textToAppend(match))
}
z
Please file a bug, tracker link is in channel topic.
v
Its already reported in Compose Issue Tracker also, this issue is only on Android, iOS works fine