Skip to content

Commit

Permalink
Merge pull request #4744 from vector-im/feature/adm/emoji-notice-fix
Browse files Browse the repository at this point in the history
Emojis in emotes causing crashes on Android 12+
  • Loading branch information
ganfra authored Dec 17, 2021
2 parents ca58a04 + 9e2fb13 commit ac65942
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/4743.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes crash when launching rooms which contain emojis in the emote content on android 12+
Original file line number Diff line number Diff line change
Expand Up @@ -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_()
Expand All @@ -625,6 +625,7 @@ class MessageItemFactory @Inject constructor(
message(message)
}
}
.bindingOptions(bindingOptions)
.leftGuideline(avatarSizeProvider.leftGuideline)
.previewUrlRetriever(callback?.getPreviewUrlRetriever())
.imageContentRenderer(imageContentRenderer)
Expand Down

0 comments on commit ac65942

Please sign in to comment.