diff --git a/changelog.d/4743.bugfix b/changelog.d/4743.bugfix new file mode 100644 index 00000000000..645b812314a --- /dev/null +++ b/changelog.d/4743.bugfix @@ -0,0 +1 @@ +Fixes crash when launching rooms which contain emojis in the emote content on android 12+ \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt index 22d282d567d..28b2d989099 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt @@ -613,7 +613,7 @@ class MessageItemFactory @Inject constructor( val formattedBody = SpannableStringBuilder() formattedBody.append("* ${informationData.memberName} ") formattedBody.append(messageContent.getHtmlBody()) - + val bindingOptions = spanUtils.getBindingOptions(formattedBody) val message = formattedBody.linkify(callback) return MessageTextItem_() @@ -625,6 +625,7 @@ class MessageItemFactory @Inject constructor( message(message) } } + .bindingOptions(bindingOptions) .leftGuideline(avatarSizeProvider.leftGuideline) .previewUrlRetriever(callback?.getPreviewUrlRetriever()) .imageContentRenderer(imageContentRenderer)