Commit 052402b4 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Merge branch 'beta' of github.com:RocketChat/Rocket.Chat.Android into fix/out-of-memory

parents aac6631e 8c7da0f8
......@@ -131,7 +131,7 @@ class MessageParser @Inject constructor(
private val builder: SpannableBuilder
) : SpannableMarkdownVisitor(configuration, builder) {
private val emojiSize = context.resources.getDimensionPixelSize(R.dimen.radius_mention)
private val emojiSize = context.resources.getDimensionPixelSize(R.dimen.custom_emoji_small)
override fun visit(document: Document) {
val spannable = EmojiParser.parse(context, builder.text())
......
This diff is collapsed.
......@@ -79,10 +79,10 @@ class EmojiParser {
val px = context.resources.getDimensionPixelSize(R.dimen.custom_emoji_small)
return spannable.also {
return spannable.also { sp ->
regex.findAll(spannable).iterator().forEach { match ->
customEmojis.find { it.shortname.toLowerCase() == match.value.toLowerCase() }?.let {
it.url?.let { url ->
customEmojis.find { it.shortname.toLowerCase() == match.value.toLowerCase() }?.let { emoji ->
emoji.url?.let { url ->
try {
val glideRequest = if (url.endsWith("gif", true)) {
GlideApp.with(context).asGif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment