mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-21 17:05:39 +03:00
Fix crash caused by empty span when removing leading newlines
Change-Id: I9045bf1314b15d3672d1837bca29fa4af4c0fdbd
This commit is contained in:
parent
16afd70294
commit
1e3b77824e
1 changed files with 3 additions and 0 deletions
|
@ -277,6 +277,9 @@ class EventHtmlRenderer @Inject constructor(
|
|||
|
||||
spans.forEach { span ->
|
||||
val start = text.getSpanStart(span)
|
||||
if (start < 0) {
|
||||
return@forEach
|
||||
}
|
||||
if (text[start] == '\n') {
|
||||
text.replace(start, start + 1, "")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue