mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 01:47:03 +05:30
chore: reflow UserProfile
code for pedantic reasons
This commit is contained in:
parent
bdca0799db
commit
3b044a8d23
1 changed files with 24 additions and 22 deletions
|
@ -110,31 +110,33 @@ private fun UserProfileInternal(
|
||||||
Text(text = user.username, style = MaterialTheme.typography.displaySmall)
|
Text(text = user.username, style = MaterialTheme.typography.displaySmall)
|
||||||
ThemedRichText(text = user.about)
|
ThemedRichText(text = user.about)
|
||||||
user.invitedBy?.let { invitedBy ->
|
user.invitedBy?.let { invitedBy ->
|
||||||
|
val linkTextStyle =
|
||||||
|
with(LocalTextStyle.current) {
|
||||||
|
SpanStyle(
|
||||||
|
LocalContentColor.current,
|
||||||
|
fontSize,
|
||||||
|
fontWeight,
|
||||||
|
fontStyle,
|
||||||
|
fontSynthesis,
|
||||||
|
fontFamily,
|
||||||
|
fontFeatureSettings,
|
||||||
|
letterSpacing,
|
||||||
|
baselineShift,
|
||||||
|
textGeometricTransform,
|
||||||
|
localeList,
|
||||||
|
background,
|
||||||
|
textDecoration,
|
||||||
|
shadow,
|
||||||
|
)
|
||||||
|
}
|
||||||
val text = buildAnnotatedString {
|
val text = buildAnnotatedString {
|
||||||
val style =
|
withStyle(linkTextStyle) { append("Invited by ") }
|
||||||
with(LocalTextStyle.current) {
|
|
||||||
SpanStyle(
|
|
||||||
LocalContentColor.current,
|
|
||||||
fontSize,
|
|
||||||
fontWeight,
|
|
||||||
fontStyle,
|
|
||||||
fontSynthesis,
|
|
||||||
fontFamily,
|
|
||||||
fontFeatureSettings,
|
|
||||||
letterSpacing,
|
|
||||||
baselineShift,
|
|
||||||
textGeometricTransform,
|
|
||||||
localeList,
|
|
||||||
background,
|
|
||||||
textDecoration,
|
|
||||||
shadow,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
withStyle(style = style) { append("Invited by ") }
|
|
||||||
pushStringAnnotation(tag = "URL", annotation = invitedBy)
|
pushStringAnnotation(tag = "URL", annotation = invitedBy)
|
||||||
withStyle(
|
withStyle(
|
||||||
style =
|
linkTextStyle.copy(
|
||||||
style.copy(textDecoration = TextDecoration.Underline, fontWeight = FontWeight.Bold)
|
textDecoration = TextDecoration.Underline,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
append(invitedBy)
|
append(invitedBy)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue