From ae6be3fdc4038e4efad0846a2f261f67403abf53 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 16 Dec 2021 18:34:00 +0000 Subject: [PATCH] adding missing binding options emote content - fixes android 12+ crash when certain emojis are used within the emote content --- .../home/room/detail/timeline/factory/MessageItemFactory.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 22d282d567..28b2d98909 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)