fix(common-ui): markdown support in community info

This commit is contained in:
Diego Beraldin 2023-09-24 15:50:43 +02:00
parent 38a49f94fe
commit 2d3108715a
2 changed files with 3 additions and 4 deletions

View File

@ -31,6 +31,7 @@ import com.github.diegoberaldin.raccoonforlemmy.core.appearance.di.getThemeRepos
import com.github.diegoberaldin.raccoonforlemmy.core.appearance.theme.Spacing
import com.github.diegoberaldin.raccoonforlemmy.core.architecture.bindToLifecycle
import com.github.diegoberaldin.raccoonforlemmy.core.commonui.components.BottomSheetHandle
import com.github.diegoberaldin.raccoonforlemmy.core.commonui.components.PostCardBody
import com.github.diegoberaldin.raccoonforlemmy.core.commonui.di.getCommunityInfoViewModel
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.CommunityModel
@ -97,11 +98,9 @@ class CommunityInfoScreen(
fontScale = fontScale,
),
) {
Text(
PostCardBody(
modifier = Modifier.fillMaxWidth(),
text = uiState.community.description,
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onBackground,
)
}
}

View File

@ -24,7 +24,7 @@ fun PostCardTitle(
Markdown(
modifier = modifier,
content = text,
content = text.replace("&", "&"),
typography = markdownTypography(
h1 = MaterialTheme.typography.titleLarge,
h2 = MaterialTheme.typography.titleLarge,