mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Change usage of SpannableStringBuilder when this is not required
This commit is contained in:
parent
df3f8bd88e
commit
ab70ee5ae2
2 changed files with 3 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
package im.vector.app.features.home.room.detail.timeline.factory
|
||||
|
||||
import android.text.Spannable
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.Spanned
|
||||
import android.text.TextPaint
|
||||
|
@ -515,7 +516,7 @@ class MessageItemFactory @Inject constructor(
|
|||
|
||||
private fun annotateWithEdited(linkifiedBody: CharSequence,
|
||||
callback: TimelineEventController.Callback?,
|
||||
informationData: MessageInformationData): SpannableStringBuilder {
|
||||
informationData: MessageInformationData): Spannable {
|
||||
val spannable = SpannableStringBuilder()
|
||||
spannable.append(linkifiedBody)
|
||||
val editedSuffix = stringProvider.getString(R.string.edited_suffix)
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
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
|
||||
|
@ -45,7 +44,7 @@ fun CharSequence.findPillsAndProcess(scope: CoroutineScope, processBlock: (PillI
|
|||
|
||||
fun CharSequence.linkify(callback: TimelineEventController.UrlClickCallback?): CharSequence {
|
||||
val text = this.toString()
|
||||
val spannable = SpannableStringBuilder(this)
|
||||
val spannable = toSpannable()
|
||||
MatrixLinkify.addLinks(spannable, object : MatrixPermalinkSpan.Callback {
|
||||
override fun onUrlClicked(url: String) {
|
||||
callback?.onUrlClicked(url, text)
|
||||
|
|
Loading…
Reference in a new issue