Skip to content

Commit

Permalink
ANDROID-14792 Update. Support custom link tag according to @jeprubio
Browse files Browse the repository at this point in the history
…suggestion
  • Loading branch information
haynlo committed Dec 19, 2024
1 parent 5a27f34 commit f85d561
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fun getAnnotatedLinksString(
val (linkText, link) = linkEntry
withLink(
link = LinkAnnotation.Clickable(
tag = TAG,
tag = link.tag,
styles = TextLinkStyles(style = SpanStyle(color = highlightColor)),
linkInteractionListener = { link.onLinkTapped.invoke() },
),
Expand All @@ -63,7 +63,7 @@ fun getAnnotatedLinksString(
}
}

data class TextLink(val link: String, val onLinkTapped: () -> Unit)
data class TextLink(val link: String, val tag: String = TAG, val onLinkTapped: () -> Unit)

private const val TAG = "TextWithLinks"

Expand Down

0 comments on commit f85d561

Please sign in to comment.