Search for the first occurrence (and not last) of breaking line just in case
This commit is contained in:
parent
58d182aecb
commit
fcfef53043
@ -44,7 +44,7 @@ class ProcessBodyOfReplyToEventUseCase @Inject constructor(
|
||||
|
||||
fun execute(roomId: String, matrixFormattedBody: String, replyToContent: ReplyToContent): String {
|
||||
val repliedToEvent = replyToContent.eventId?.let { getEvent(it, roomId) }
|
||||
val breakingLineIndex = matrixFormattedBody.lastIndexOf(BREAKING_LINE)
|
||||
val breakingLineIndex = matrixFormattedBody.indexOf(BREAKING_LINE)
|
||||
val endOfBlockQuoteIndex = matrixFormattedBody.lastIndexOf(ENDING_BLOCK_QUOTE)
|
||||
|
||||
val withTranslatedContent = if (repliedToEvent != null && breakingLineIndex != -1 && endOfBlockQuoteIndex != -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user