From b82ab6bb4f55cdff5bebb5891303106894ad4165 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Sun, 8 Jul 2018 14:40:56 +0200 Subject: [PATCH] fix custom emojis in mention autocomplete --- .../tusky/adapter/MentionAutoCompleteAdapter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/MentionAutoCompleteAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/MentionAutoCompleteAdapter.java index 8b62af1c..b0a9def9 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/MentionAutoCompleteAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/MentionAutoCompleteAdapter.java @@ -30,6 +30,7 @@ import android.widget.TextView; import com.keylesspalace.tusky.R; import com.keylesspalace.tusky.entity.Account; +import com.keylesspalace.tusky.util.CustomEmojiHelper; import com.keylesspalace.tusky.view.RoundedTransformation; import com.squareup.picasso.Picasso; @@ -124,7 +125,8 @@ public class MentionAutoCompleteAdapter extends ArrayAdapter String format = getContext().getString(R.string.status_username_format); String formattedUsername = String.format(format, account.getUsername()); username.setText(formattedUsername); - displayName.setText(account.getName()); + CharSequence emojifiedName = CustomEmojiHelper.emojifyString(account.getName(), account.getEmojis(), displayName); + displayName.setText(emojifiedName); if (!account.getAvatar().isEmpty()) { Picasso.with(context) .load(account.getAvatar())