mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 01:45:52 +03:00
Hide reply-fallback from reply preview
Change-Id: I368f80cec1a94ea4b5551cd41d89e096ae5286cd
This commit is contained in:
parent
5aa3a4a764
commit
7ffa6214a4
1 changed files with 2 additions and 1 deletions
|
@ -50,6 +50,7 @@ import org.matrix.android.sdk.api.session.room.model.message.MessageContent
|
|||
import org.matrix.android.sdk.api.session.room.model.message.MessageFormat
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessagePollContent
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessageTextContent
|
||||
import org.matrix.android.sdk.api.util.ContentUtils.extractUsefulTextFromHtmlReply
|
||||
import org.matrix.android.sdk.api.util.MatrixItem
|
||||
import org.matrix.android.sdk.api.util.toMatrixItem
|
||||
import javax.inject.Inject
|
||||
|
@ -206,7 +207,7 @@ class PlainTextComposerLayout @JvmOverloads constructor(
|
|||
var formattedBody: CharSequence? = null
|
||||
if (messageContent is MessageTextContent && messageContent.format == MessageFormat.FORMAT_MATRIX_HTML) {
|
||||
val parser = Parser.builder().build()
|
||||
val document = parser.parse(messageContent.formattedBody ?: messageContent.body)
|
||||
val document = parser.parse(messageContent.formattedBody?.let { extractUsefulTextFromHtmlReply(it) } ?: messageContent.body)
|
||||
formattedBody = eventHtmlRenderer.render(document, pillsPostProcessor)
|
||||
}
|
||||
views.composerRelatedMessageContent.text = (formattedBody ?: nonFormattedBody)
|
||||
|
|
Loading…
Reference in a new issue