From 77ad34ce563607a6f7aefbf56eed4f174b7e211a Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Sat, 2 Apr 2016 15:11:30 -0400 Subject: [PATCH] prevent NPE by removing log statement --- .../antennapod/adapter/SubscriptionsAdapter.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java index f865ae001..e2561804e 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsAdapter.java @@ -102,17 +102,12 @@ public class SubscriptionsAdapter extends BaseAdapter implements AdapterView.OnI final Feed feed = (Feed) getItem(position); if (feed == null) return null; - String title = feed.getTitle(); - long feedId = feed.getId(); - int counter = itemAccess.getFeedCounter(feedId); - Uri imageUri = feed.getImageUri(); - Log.i(TAG, String.format("Title: %s id: %d counter: %d uri: %s", title, feedId, counter, imageUri.toString())); - holder.feedTitle.setText(title); + holder.feedTitle.setText(feed.getTitle()); holder.feedTitle.setVisibility(View.VISIBLE); - holder.count.setPrimaryText(String.valueOf(counter)); + holder.count.setPrimaryText(String.valueOf(itemAccess.getFeedCounter(feed.getId()))); holder.count.setVisibility(View.VISIBLE); Glide.with(mainActivityRef.get()) - .load(imageUri) + .load(feed.getImageUri()) .error(R.color.light_gray) .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY) .fitCenter()