Refactors clickable text
This commit is contained in:
@@ -304,6 +304,8 @@ fun CreateClickableText(
|
||||
val primaryColor = MaterialTheme.colorScheme.primary
|
||||
val onBackgroundColor = MaterialTheme.colorScheme.onBackground
|
||||
|
||||
val text =
|
||||
remember(clickablePart, suffix) {
|
||||
val clickablePartStyle =
|
||||
SpanStyle(
|
||||
color = overrideColor ?: primaryColor,
|
||||
@@ -316,8 +318,6 @@ fun CreateClickableText(
|
||||
fontWeight = fontWeight,
|
||||
)
|
||||
|
||||
val text =
|
||||
remember(clickablePartStyle, nonClickablePartStyle, clickablePart, suffix) {
|
||||
buildAnnotatedString {
|
||||
withStyle(clickablePartStyle) { append(clickablePart) }
|
||||
if (!suffix.isNullOrBlank()) {
|
||||
|
||||
Reference in New Issue
Block a user