mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
Search for the first occurrence (and not last) of breaking line just in case
This commit is contained in:
parent
58d182aecb
commit
fcfef53043
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue