Fix compact view showing username instead of the community name

Closes #131
This commit is contained in:
Balazs Toldi 2023-08-17 22:02:48 +02:00
parent ac5e67c032
commit ec9be3f6af
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58

View File

@ -1202,7 +1202,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
}
((PostCompactBaseViewHolder) holder).nameTextView.setTextColor(mSubredditColor);
((PostCompactBaseViewHolder) holder).nameTextView.setText((mShowDisplayNames) ? post.getAuthor() : post.getAuthorInfo().getUsername());
((PostCompactBaseViewHolder) holder).nameTextView.setText((mShowDisplayNames) ? post.getSubredditName() : post.getCommunityInfo().getName());
if (!mHideSubredditAndUserPrefix) {
((PostCompactBaseViewHolder) holder).instanceTextView.setText('@' + post.getSubredditNamePrefixed().split(Pattern.quote("@"))[1]);
((PostCompactBaseViewHolder) holder).instanceTextView.setTextColor(CustomThemeWrapper.darkenColor(mSubredditColor, 0.7f));