From 86dec51fe1b15eb5c5407b338fc8a08afc8df17c Mon Sep 17 00:00:00 2001 From: Apostolof Date: Fri, 10 Aug 2018 16:59:38 +0300 Subject: [PATCH] Fix member of the month pink border --- .../mthmmy/activities/topic/TopicAdapter.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java index cb4e7176..021cd720 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java @@ -16,7 +16,6 @@ import android.support.v4.content.res.ResourcesCompat; import android.support.v7.app.AlertDialog; import android.support.v7.content.res.AppCompatResources; import android.support.v7.widget.AppCompatImageButton; -import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; @@ -285,15 +284,6 @@ class TopicAdapter extends RecyclerView.Adapter { holder.stars.setVisibility(View.VISIBLE); } else holder.stars.setVisibility(View.GONE); - //Special card for special member of the month! - if (mUserColor == TopicParser.USER_COLOR_PINK) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - holder.cardChildLinear.setBackground(context.getResources(). - getDrawable(R.drawable.member_of_the_month_card, null)); - } else //noinspection deprecation - holder.cardChildLinear.setBackground(context.getResources(). - getDrawable(R.drawable.member_of_the_month_card)); - } else holder.cardChildLinear.setBackground(null); if (currentPost.isUserMentionedInPost()) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { @@ -302,6 +292,14 @@ class TopicAdapter extends RecyclerView.Adapter { } else //noinspection deprecation holder.cardChildLinear.setBackground(context.getResources(). getDrawable(R.drawable.mention_card)); + } else if (mUserColor == TopicParser.USER_COLOR_PINK) { + //Special card for special member of the month! + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + holder.cardChildLinear.setBackground(context.getResources(). + getDrawable(R.drawable.member_of_the_month_card, null)); + } else //noinspection deprecation + holder.cardChildLinear.setBackground(context.getResources(). + getDrawable(R.drawable.member_of_the_month_card)); } else holder.cardChildLinear.setBackground(null); //Avoid's view's visibility recycling