summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/adapter
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java
index 6cde97148..818f662cd 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java
@@ -27,7 +27,6 @@ import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MainActivity;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.preferences.UserPreferences;
-import de.danoeh.antennapod.core.storage.DBReader;
import de.danoeh.antennapod.fragment.AddFeedFragment;
import de.danoeh.antennapod.fragment.AllEpisodesFragment;
import de.danoeh.antennapod.fragment.DownloadsFragment;
@@ -266,12 +265,13 @@ public class NavListAdapter extends BaseAdapter
holder.title.setText(feed.getTitle());
- int feedUnreadItems = DBReader.getNumberOfUnreadItems(context, feed.getId());
+
if(feed.hasLastUpdateFailed()) {
holder.failure.setVisibility(View.VISIBLE);
} else {
holder.failure.setVisibility(View.GONE);
}
+ int feedUnreadItems = itemAccess.getNumberOfUnreadFeedItems(feed.getId());
if(feedUnreadItems > 0) {
holder.count.setVisibility(View.VISIBLE);
holder.count.setText(String.valueOf(feedUnreadItems));
@@ -301,6 +301,7 @@ public class NavListAdapter extends BaseAdapter
int getSelectedItemIndex();
int getQueueSize();
int getNumberOfUnreadItems();
+ int getNumberOfUnreadFeedItems(long feedId);
}
}