mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Merge branch 'feature/aris/fix_immutable_model_crash' into feature/aris/threads
This commit is contained in:
commit
dca5bea744
1
changelog.d/4742.bugfix
Normal file
1
changelog.d/4742.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix app crash uppon long press on a reply event
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user