Fix inline span counting

This commit is contained in:
Tak! 2024-11-15 19:40:35 +01:00
parent b0d4b5d006
commit 59a6bd1f7a
1 changed files with 2 additions and 2 deletions

View File

@ -91,10 +91,10 @@ fun setClickableText(
view.text = spannableContent.apply {
styleQuoteSpans(view)
getSpans(0, endOfContent, URLSpan::class.java).forEach { span ->
val updated = setClickableText(span, this, mentions, tags, listener)
if (updated[0] == '#') {
if (get(getSpanStart(span)) == '#') {
inlineHashtagSpanCount += 1
}
setClickableText(span, this, mentions, tags, listener)
}
}.subSequence(0, endOfContent)