diff --git a/app/build.gradle b/app/build.gradle index 97ae004b..1372450b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,10 +19,10 @@ android { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } - /*debug { - def date = new Date().format('ddMMyy_HHmmss'); + debug { + def date = new Date().format('ddMMyy_HHmmss') archivesBaseName = archivesBaseName + "-$date" - }*/ + } } } @@ -50,6 +50,6 @@ dependencies { compile 'com.jakewharton.timber:timber:4.5.1' } -if (!getGradle().getStartParameter().getTaskRequests().toString().contains("Debug")){ +if (getGradle().getStartParameter().getTaskRequests().toString().contains("Release")){ apply plugin: 'com.google.gms.google-services' } diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java index 9e8c40ea..b7162495 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java @@ -1,7 +1,6 @@ package gr.thmmy.mthmmy.activities.profile.latestPosts; import android.support.v7.widget.RecyclerView; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -47,7 +46,6 @@ class LatestPostsAdapter extends RecyclerView.Adapter { @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == VIEW_TYPE_EMPTY) { - Log.d("This", "in"); View view = LayoutInflater.from(parent.getContext()). inflate(R.layout.fragment_latest_posts_empty_message, parent, false); return new RecyclerView.ViewHolder(view){}; 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 55663d9d..d3d95796 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 @@ -62,6 +62,8 @@ import static gr.thmmy.mthmmy.activities.profile.ProfileActivity.BUNDLE_PROFILE_ import static gr.thmmy.mthmmy.activities.profile.ProfileActivity.BUNDLE_PROFILE_URL; import static gr.thmmy.mthmmy.activities.profile.ProfileActivity.BUNDLE_PROFILE_USERNAME; import static gr.thmmy.mthmmy.activities.topic.Posting.htmlToBBcode; +import static gr.thmmy.mthmmy.activities.topic.TopicParser.USER_COLOR_WHITE; +import static gr.thmmy.mthmmy.activities.topic.TopicParser.USER_COLOR_YELLOW; import static gr.thmmy.mthmmy.base.BaseActivity.getSessionManager; /** @@ -309,6 +311,11 @@ class TopicAdapter extends RecyclerView.Adapter { holder.personalText.setVisibility(View.VISIBLE); } else holder.personalText.setVisibility(View.GONE); + if (mUserColor != USER_COLOR_YELLOW){ + holder.username.setTextColor(mUserColor); + } else { + holder.username.setTextColor(USER_COLOR_WHITE); + } if (mNumberOfStars > 0) { holder.stars.setTypeface(Typeface.createFromAsset(context.getAssets() , "fonts/fontawesome-webfont.ttf")); diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicParser.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicParser.java index 81b1e47f..6a05d83f 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicParser.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicParser.java @@ -35,7 +35,8 @@ class TopicParser { private static final int USER_COLOR_GREEN = Color.parseColor("#4CAF50"); private static final int USER_COLOR_BLUE = Color.parseColor("#536DFE"); static final int USER_COLOR_PINK = Color.parseColor("#FF4081"); - private static final int USER_COLOR_YELLOW = Color.parseColor("#FFEB3B"); + static final int USER_COLOR_YELLOW = Color.parseColor("#FFEB3B"); + static final int USER_COLOR_WHITE = Color.WHITE; /** * Returns users currently viewing this topic.