display account name when display name is not set (#2361)

This commit is contained in:
Konrad Pozniak 2022-03-01 21:29:16 +01:00 committed by GitHub
parent b145fc9d50
commit 4dee5c2774
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -742,7 +742,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
@Nullable Object payloads) { @Nullable Object payloads) {
if (payloads == null) { if (payloads == null) {
Status actionable = status.getActionable(); Status actionable = status.getActionable();
setDisplayName(actionable.getAccount().getDisplayName(), actionable.getAccount().getEmojis(), statusDisplayOptions); setDisplayName(actionable.getAccount().getName(), actionable.getAccount().getEmojis(), statusDisplayOptions);
setUsername(status.getUsername()); setUsername(status.getUsername());
setCreatedAt(actionable.getCreatedAt(), statusDisplayOptions); setCreatedAt(actionable.getCreatedAt(), statusDisplayOptions);
setIsReply(actionable.getInReplyToId() != null); setIsReply(actionable.getInReplyToId() != null);

View file

@ -70,7 +70,7 @@ public class StatusViewHolder extends StatusBaseViewHolder {
if (reblogging == null) { if (reblogging == null) {
hideStatusInfo(); hideStatusInfo();
} else { } else {
String rebloggedByDisplayName = reblogging.getAccount().getDisplayName(); String rebloggedByDisplayName = reblogging.getAccount().getName();
setRebloggedByDisplayName(rebloggedByDisplayName, setRebloggedByDisplayName(rebloggedByDisplayName,
reblogging.getAccount().getEmojis(), statusDisplayOptions); reblogging.getAccount().getEmojis(), statusDisplayOptions);
statusInfo.setOnClickListener(v -> listener.onOpenReblog(getBindingAdapterPosition())); statusInfo.setOnClickListener(v -> listener.onOpenReblog(getBindingAdapterPosition()));