fix: messages dont edit in real time
Signed-off-by: Infi <wingit@geist.ga>
This commit is contained in:
parent
6a520eb138
commit
083e1d52be
|
|
@ -264,17 +264,21 @@ fun Message(
|
||||||
message.content?.let {
|
message.content?.let {
|
||||||
if (message.content.isBlank()) return@let // if only an attachment is sent
|
if (message.content.isBlank()) return@let // if only an attachment is sent
|
||||||
|
|
||||||
AndroidView(factory = { ctx ->
|
AndroidView(
|
||||||
androidx.appcompat.widget.AppCompatTextView(ctx).apply {
|
factory = { ctx ->
|
||||||
text = parse(message)
|
androidx.appcompat.widget.AppCompatTextView(ctx).apply {
|
||||||
maxLines = if (truncate) 1 else Int.MAX_VALUE
|
maxLines = if (truncate) 1 else Int.MAX_VALUE
|
||||||
ellipsize = TextUtils.TruncateAt.END
|
ellipsize = TextUtils.TruncateAt.END
|
||||||
textSize = 16f
|
textSize = 16f
|
||||||
typeface = ResourcesCompat.getFont(ctx, R.font.inter)
|
typeface = ResourcesCompat.getFont(ctx, R.font.inter)
|
||||||
|
|
||||||
setTextColor(contentColor.toArgb())
|
setTextColor(contentColor.toArgb())
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update = {
|
||||||
|
it.text = parse(message)
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
message.attachments?.let {
|
message.attachments?.let {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue