Disable unnecessary reply fallback processing

We have rich replies!

Change-Id: Ifc5f41471f32e0a60e23f41c7fa9a51f25865d77
This commit is contained in:
SpiritCroc 2022-12-13 10:42:23 +01:00
parent 035e1ae7f7
commit c626100ae1
2 changed files with 6 additions and 2 deletions

View File

@ -602,6 +602,7 @@ class MessageItemFactory @Inject constructor(
} }
} }
@Suppress("UNUSED_PARAMETER")
private fun buildFormattedTextItem( private fun buildFormattedTextItem(
matrixFormattedBody: String, matrixFormattedBody: String,
informationData: MessageInformationData, informationData: MessageInformationData,
@ -610,10 +611,12 @@ class MessageItemFactory @Inject constructor(
attributes: AbsMessageItem.Attributes, attributes: AbsMessageItem.Attributes,
replyToContent: ReplyToContent?, replyToContent: ReplyToContent?,
): MessageTextItem? { ): MessageTextItem? {
val processedBody = replyToContent /*
val processedBody = matrixFormattedBodyreplyToContent
?.let { processBodyOfReplyToEventUseCase.execute(roomId, matrixFormattedBody, it) } ?.let { processBodyOfReplyToEventUseCase.execute(roomId, matrixFormattedBody, it) }
?: matrixFormattedBody ?: matrixFormattedBody
val compressed = htmlCompressor.compress(processedBody) */
val compressed = htmlCompressor.compress(matrixFormattedBody)
val renderedFormattedBody = htmlRenderer.get().render(compressed, pillsPostProcessor) as Spanned val renderedFormattedBody = htmlRenderer.get().render(compressed, pillsPostProcessor) as Spanned
val pseudoEmojiBody = htmlRenderer.get().render(customToPseudoEmoji(compressed), pillsPostProcessor) as Spanned val pseudoEmojiBody = htmlRenderer.get().render(customToPseudoEmoji(compressed), pillsPostProcessor) as Spanned
return buildMessageTextItem( return buildMessageTextItem(

View File

@ -42,6 +42,7 @@ class ProcessBodyOfReplyToEventUseCase @Inject constructor(
private val stringProvider: StringProvider, private val stringProvider: StringProvider,
) { ) {
@Deprecated("SchildiChat doesn't need this, we have rich replies!")
fun execute(roomId: String, matrixFormattedBody: String, replyToContent: ReplyToContent): String { fun execute(roomId: String, matrixFormattedBody: String, replyToContent: ReplyToContent): String {
val repliedToEvent = replyToContent.eventId?.let { getEvent(it, roomId) } val repliedToEvent = replyToContent.eventId?.let { getEvent(it, roomId) }
val breakingLineIndex = matrixFormattedBody.indexOf(BREAKING_LINE) val breakingLineIndex = matrixFormattedBody.indexOf(BREAKING_LINE)