diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/BlockedCommunitiesRecyclerViewAdapter.java b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/BlockedCommunitiesRecyclerViewAdapter.java index 3bd71d14..85c4a900 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/BlockedCommunitiesRecyclerViewAdapter.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/BlockedCommunitiesRecyclerViewAdapter.java @@ -15,6 +15,7 @@ import com.bumptech.glide.request.RequestOptions; import java.util.List; import java.util.concurrent.Executor; +import java.util.regex.Pattern; import butterknife.BindView; import butterknife.ButterKnife; @@ -186,6 +187,10 @@ public class BlockedCommunitiesRecyclerViewAdapter extends RecyclerView.Adapter< .into(((SubredditViewHolder) viewHolder).iconGifImageView); } ((SubredditViewHolder) viewHolder).subredditNameTextView.setText(name); + if (fullname.contains("@")) { + ((SubredditViewHolder) viewHolder).communityInstanceTextView.setText("@" + fullname.split(Pattern.quote("@"), 2)[1]); + ((SubredditViewHolder) viewHolder).communityInstanceTextView.setTextColor(CustomThemeWrapper.darkenColor(primaryTextColor, 0.7f)); + } } else if (viewHolder instanceof FavoriteSubredditViewHolder) { int offset; if (itemClickListener != null) { @@ -318,6 +323,9 @@ public class BlockedCommunitiesRecyclerViewAdapter extends RecyclerView.Adapter< @BindView(R.id.thing_name_text_view_item_subscribed_thing) TextView subredditNameTextView; + @BindView(R.id.thing_instance_text_view_item_subscribed_thing) + TextView communityInstanceTextView; + SubredditViewHolder(View itemView) { super(itemView); ButterKnife.bind(this, itemView); diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/SubredditListingRecyclerViewAdapter.java b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/SubredditListingRecyclerViewAdapter.java index 3ba8cea6..dfb01f6e 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/SubredditListingRecyclerViewAdapter.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/SubredditListingRecyclerViewAdapter.java @@ -141,7 +141,8 @@ public class SubredditListingRecyclerViewAdapter extends PagedListAdapter + + + - + android:orientation="horizontal"> + + + + +