Unverified Commit 30a35675 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge branch 'beta' into fix/create-channel-fragment

parents 436d52ff 8c7da0f8
...@@ -131,7 +131,7 @@ class MessageParser @Inject constructor( ...@@ -131,7 +131,7 @@ class MessageParser @Inject constructor(
private val builder: SpannableBuilder private val builder: SpannableBuilder
) : SpannableMarkdownVisitor(configuration, builder) { ) : 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) { override fun visit(document: Document) {
val spannable = EmojiParser.parse(context, builder.text()) val spannable = EmojiParser.parse(context, builder.text())
......
This diff is collapsed.
...@@ -79,10 +79,10 @@ class EmojiParser { ...@@ -79,10 +79,10 @@ class EmojiParser {
val px = context.resources.getDimensionPixelSize(R.dimen.custom_emoji_small) val px = context.resources.getDimensionPixelSize(R.dimen.custom_emoji_small)
return spannable.also { return spannable.also { sp ->
regex.findAll(spannable).iterator().forEach { match -> regex.findAll(spannable).iterator().forEach { match ->
customEmojis.find { it.shortname.toLowerCase() == match.value.toLowerCase() }?.let { customEmojis.find { it.shortname.toLowerCase() == match.value.toLowerCase() }?.let { emoji ->
it.url?.let { url -> emoji.url?.let { url ->
try { try {
val glideRequest = if (url.endsWith("gif", true)) { val glideRequest = if (url.endsWith("gif", true)) {
GlideApp.with(context).asGif() 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