Merge branch 'feature/aris/fix_immutable_model_crash' into feature/aris/threads

This commit is contained in:
ariskotsomitopoulos 2021-12-16 20:56:10 +02:00
commit dca5bea744
2 changed files with 3 additions and 1 deletions

1
changelog.d/4742.bugfix Normal file
View File

@ -0,0 +1 @@
Fix app crash uppon long press on a reply event

View File

@ -16,6 +16,7 @@
package im.vector.app.features.home.room.detail.timeline.tools
import android.text.SpannableStringBuilder
import android.text.style.ClickableSpan
import android.view.MotionEvent
import android.widget.TextView
@ -44,7 +45,7 @@ fun CharSequence.findPillsAndProcess(scope: CoroutineScope, processBlock: (PillI
fun CharSequence.linkify(callback: TimelineEventController.UrlClickCallback?): CharSequence {
val text = this.toString()
val spannable = toSpannable()
val spannable = SpannableStringBuilder(this)
MatrixLinkify.addLinks(spannable, object : MatrixPermalinkSpan.Callback {
override fun onUrlClicked(url: String) {
callback?.onUrlClicked(url, text)