fix custom emojis in mention autocomplete

This commit is contained in:
Conny Duck 2018-07-08 14:40:56 +02:00
parent 26529b19d5
commit b82ab6bb4f

View file

@ -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<Account>
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())