fix custom emojis in mention autocomplete

main
Conny Duck 6 years ago
parent e7a13b3f9e
commit 1ee53f6269
  1. 4
      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.R;
import com.keylesspalace.tusky.entity.Account; import com.keylesspalace.tusky.entity.Account;
import com.keylesspalace.tusky.util.CustomEmojiHelper;
import com.keylesspalace.tusky.view.RoundedTransformation; import com.keylesspalace.tusky.view.RoundedTransformation;
import com.squareup.picasso.Picasso; 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 format = getContext().getString(R.string.status_username_format);
String formattedUsername = String.format(format, account.getUsername()); String formattedUsername = String.format(format, account.getUsername());
username.setText(formattedUsername); username.setText(formattedUsername);
displayName.setText(account.getName()); CharSequence emojifiedName = CustomEmojiHelper.emojifyString(account.getName(), account.getEmojis(), displayName);
displayName.setText(emojifiedName);
if (!account.getAvatar().isEmpty()) { if (!account.getAvatar().isEmpty()) {
Picasso.with(context) Picasso.with(context)
.load(account.getAvatar()) .load(account.getAvatar())

Loading…
Cancel
Save