Fix feed name color when no color is available

This commit is contained in:
Shinokuni 2019-02-15 12:02:57 +00:00
parent 76aef3916a
commit b53463b2d4
1 changed files with 4 additions and 1 deletions

View File

@ -103,10 +103,13 @@ public class MainItemListAdapter extends ListAdapter<ItemWithFeed, MainItemListA
} else
viewHolder.feedIcon.setImageResource(R.drawable.ic_rss_feed);
Resources resources = viewHolder.itemView.getResources();
if (itemWithFeed.getColor() != 0)
viewHolder.feedName.setTextColor(itemWithFeed.getColor());
else
viewHolder.feedName.setTextColor(resources.getColor(android.R.color.tab_indicator_text));
Resources resources = viewHolder.itemView.getResources();
int minutes = (int)Math.round(itemWithFeed.getItem().getReadTime());
if (minutes < 1)
viewHolder.itemReadTime.setText(resources.getString(R.string.read_time_lower_than_1));