mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-17 00:01:27 +02:00
Improving rendering of reaction types
This commit is contained in:
parent
9fef3e9e3e
commit
820def620c
@ -821,13 +821,16 @@ private fun RenderReactionType(
|
||||
iconSize: Dp = Size20dp,
|
||||
iconFontSize: TextUnit
|
||||
) {
|
||||
if (reactionType.startsWith(":")) {
|
||||
val noStartColon = reactionType.removePrefix(":")
|
||||
val url = noStartColon.substringAfter(":")
|
||||
val isCustom = remember(reactionType) {
|
||||
reactionType.startsWith(":")
|
||||
}
|
||||
|
||||
val renderable = listOf(
|
||||
ImageUrlType(url)
|
||||
).toImmutableList()
|
||||
if (isCustom) {
|
||||
val renderable = remember(reactionType) {
|
||||
listOf(
|
||||
ImageUrlType(reactionType.removePrefix(":").substringAfter(":"))
|
||||
).toImmutableList()
|
||||
}
|
||||
|
||||
InLineIconRenderer(
|
||||
renderable,
|
||||
|
Loading…
x
Reference in New Issue
Block a user