mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 09:57:04 +05:30
fix(common): restore older link styling in user profiles
This commit is contained in:
parent
ca37557297
commit
bdca0799db
1 changed files with 9 additions and 3 deletions
|
@ -16,6 +16,8 @@ import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.text.ClickableText
|
import androidx.compose.foundation.text.ClickableText
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.AccountCircle
|
import androidx.compose.material.icons.filled.AccountCircle
|
||||||
|
import androidx.compose.material3.LocalContentColor
|
||||||
|
import androidx.compose.material3.LocalTextStyle
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.Surface
|
import androidx.compose.material3.Surface
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
|
@ -27,6 +29,7 @@ import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.text.SpanStyle
|
import androidx.compose.ui.text.SpanStyle
|
||||||
import androidx.compose.ui.text.buildAnnotatedString
|
import androidx.compose.ui.text.buildAnnotatedString
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.style.TextDecoration
|
import androidx.compose.ui.text.style.TextDecoration
|
||||||
import androidx.compose.ui.text.withStyle
|
import androidx.compose.ui.text.withStyle
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
@ -109,9 +112,9 @@ private fun UserProfileInternal(
|
||||||
user.invitedBy?.let { invitedBy ->
|
user.invitedBy?.let { invitedBy ->
|
||||||
val text = buildAnnotatedString {
|
val text = buildAnnotatedString {
|
||||||
val style =
|
val style =
|
||||||
with(MaterialTheme.typography.bodyMedium) {
|
with(LocalTextStyle.current) {
|
||||||
SpanStyle(
|
SpanStyle(
|
||||||
MaterialTheme.colorScheme.onPrimaryContainer,
|
LocalContentColor.current,
|
||||||
fontSize,
|
fontSize,
|
||||||
fontWeight,
|
fontWeight,
|
||||||
fontStyle,
|
fontStyle,
|
||||||
|
@ -129,7 +132,10 @@ private fun UserProfileInternal(
|
||||||
}
|
}
|
||||||
withStyle(style = style) { append("Invited by ") }
|
withStyle(style = style) { append("Invited by ") }
|
||||||
pushStringAnnotation(tag = "URL", annotation = invitedBy)
|
pushStringAnnotation(tag = "URL", annotation = invitedBy)
|
||||||
withStyle(style = style.copy(textDecoration = TextDecoration.Underline)) {
|
withStyle(
|
||||||
|
style =
|
||||||
|
style.copy(textDecoration = TextDecoration.Underline, fontWeight = FontWeight.Bold)
|
||||||
|
) {
|
||||||
append(invitedBy)
|
append(invitedBy)
|
||||||
}
|
}
|
||||||
pop()
|
pop()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue