Bugfix: Text after the last pill was not send
This commit is contained in:
parent
4f3da353e4
commit
998d9f2c59
|
@ -62,10 +62,14 @@ internal class TextPillsUtils @Inject constructor(
|
|||
var currIndex = 0
|
||||
pills.forEachIndexed { _, (urlSpan, start, end) ->
|
||||
// We want to replace with the pill with a html link
|
||||
// append text before pill
|
||||
append(text, currIndex, start)
|
||||
// append the pill
|
||||
append(String.format(template, urlSpan.userId, urlSpan.displayName))
|
||||
currIndex = end
|
||||
}
|
||||
// append text after the last pill
|
||||
append(text, currIndex, text.length)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue