Improving rendering of reaction types
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user