Merge pull request #4744 from vector-im/feature/adm/emoji-notice-fix

Emojis in emotes causing crashes on Android 12+
This commit is contained in:
ganfra 2021-12-17 11:47:16 +01:00 committed by GitHub
commit ac65942c28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

1
changelog.d/4743.bugfix Normal file
View File

@ -0,0 +1 @@
Fixes crash when launching rooms which contain emojis in the emote content on android 12+

View File

@ -613,7 +613,7 @@ class MessageItemFactory @Inject constructor(
val formattedBody = SpannableStringBuilder() val formattedBody = SpannableStringBuilder()
formattedBody.append("* ${informationData.memberName} ") formattedBody.append("* ${informationData.memberName} ")
formattedBody.append(messageContent.getHtmlBody()) formattedBody.append(messageContent.getHtmlBody())
val bindingOptions = spanUtils.getBindingOptions(formattedBody)
val message = formattedBody.linkify(callback) val message = formattedBody.linkify(callback)
return MessageTextItem_() return MessageTextItem_()
@ -625,6 +625,7 @@ class MessageItemFactory @Inject constructor(
message(message) message(message)
} }
} }
.bindingOptions(bindingOptions)
.leftGuideline(avatarSizeProvider.leftGuideline) .leftGuideline(avatarSizeProvider.leftGuideline)
.previewUrlRetriever(callback?.getPreviewUrlRetriever()) .previewUrlRetriever(callback?.getPreviewUrlRetriever())
.imageContentRenderer(imageContentRenderer) .imageContentRenderer(imageContentRenderer)