adding comment to explain SpannableStringBuilder usage
This commit is contained in:
parent
cabf12289b
commit
b73bae452a
|
@ -44,7 +44,8 @@ fun CharSequence.findPillsAndProcess(scope: CoroutineScope, processBlock: (PillI
|
|||
}
|
||||
|
||||
fun CharSequence.linkify(callback: TimelineEventController.UrlClickCallback?): CharSequence {
|
||||
val text = this.toString()
|
||||
val text = this.toString()
|
||||
// SpannableStringBuilder is used to avoid Epoxy throwing ImmutableModelException
|
||||
val spannable = SpannableStringBuilder(this)
|
||||
MatrixLinkify.addLinks(spannable, object : MatrixPermalinkSpan.Callback {
|
||||
override fun onUrlClicked(url: String) {
|
||||
|
|
Loading…
Reference in New Issue