Fix bullet points not having leading margin on timeline items (#4536)
* Fix bullet points not having leading margin on timeline items * Remove other usages of `SpannableString` constructor, use either `valueOf` to reuse the existing value or `SpannedString` instead if the spans don't have to change
This commit is contained in:
parent
a63dffdcef
commit
dac0eb6762
5 changed files with 8 additions and 10 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
package io.element.android.features.messages.impl.timeline.components.event
|
||||
|
||||
import android.text.SpannableString
|
||||
import android.text.SpannedString
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.material3.LocalContentColor
|
||||
|
|
@ -71,7 +71,7 @@ fun TimelineItemTextView(
|
|||
internal fun getTextWithResolvedMentions(content: TimelineItemTextBasedContent): CharSequence {
|
||||
val mentionSpanUpdater = LocalMentionSpanUpdater.current
|
||||
val bodyWithResolvedMentions = mentionSpanUpdater.rememberMentionSpans(content.formattedBody)
|
||||
return SpannableString(bodyWithResolvedMentions)
|
||||
return SpannedString.valueOf(bodyWithResolvedMentions)
|
||||
}
|
||||
|
||||
@PreviewsDayNight
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue