mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
adding comment to explain SpannableStringBuilder usage
This commit is contained in:
parent
cabf12289b
commit
b73bae452a
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue