Fix user name on collapsed comments

Closes #161
This commit is contained in:
Balazs Toldi 2023-08-23 22:35:51 +02:00
parent 2561ba8bd0
commit 6221b33a3d
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58

View File

@ -572,7 +572,9 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
} else if (holder instanceof CommentFullyCollapsedViewHolder) {
Comment comment = getCurrentComment(position);
if (comment != null) {
String authorWithPrefix = "u/" + comment.getAuthorName();
String author_name = (mShowUserDisplayName) ? comment.getAuthorName() : comment.getAuthor().getUsername();
String authorInstance = (mHideUserInstance) ? "" : "@" + comment.getAuthor().getQualifiedName().split(Pattern.quote("@"))[1];
String authorWithPrefix = author_name + authorInstance;
((CommentFullyCollapsedViewHolder) holder).usernameTextView.setText(authorWithPrefix);
if (comment.getAuthorIconUrl() == null) {