Improving rendering of reaction types

This commit is contained in:
Vitor Pamplona
2023-10-30 12:52:19 -04:00
parent 9fef3e9e3e
commit 820def620c
@@ -821,13 +821,16 @@ private fun RenderReactionType(
iconSize: Dp = Size20dp, iconSize: Dp = Size20dp,
iconFontSize: TextUnit iconFontSize: TextUnit
) { ) {
if (reactionType.startsWith(":")) { val isCustom = remember(reactionType) {
val noStartColon = reactionType.removePrefix(":") reactionType.startsWith(":")
val url = noStartColon.substringAfter(":") }
val renderable = listOf( if (isCustom) {
ImageUrlType(url) val renderable = remember(reactionType) {
).toImmutableList() listOf(
ImageUrlType(reactionType.removePrefix(":").substringAfter(":"))
).toImmutableList()
}
InLineIconRenderer( InLineIconRenderer(
renderable, renderable,