Merge pull request #1993 from mfietz/issue/1914-subscription-counter
Subscriptions: Show indicator only when count > 0
This commit is contained in:
commit
578628da6a
|
@ -102,8 +102,13 @@ public class SubscriptionsAdapter extends BaseAdapter implements AdapterView.OnI
|
||||||
|
|
||||||
holder.feedTitle.setText(feed.getTitle());
|
holder.feedTitle.setText(feed.getTitle());
|
||||||
holder.feedTitle.setVisibility(View.VISIBLE);
|
holder.feedTitle.setVisibility(View.VISIBLE);
|
||||||
|
int count = itemAccess.getFeedCounter(feed.getId());
|
||||||
|
if(count > 0) {
|
||||||
holder.count.setPrimaryText(String.valueOf(itemAccess.getFeedCounter(feed.getId())));
|
holder.count.setPrimaryText(String.valueOf(itemAccess.getFeedCounter(feed.getId())));
|
||||||
holder.count.setVisibility(View.VISIBLE);
|
holder.count.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
holder.count.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
Glide.with(mainActivityRef.get())
|
Glide.with(mainActivityRef.get())
|
||||||
.load(feed.getImageLocation())
|
.load(feed.getImageLocation())
|
||||||
.error(R.color.light_gray)
|
.error(R.color.light_gray)
|
||||||
|
|
Loading…
Reference in New Issue