summaryrefslogtreecommitdiff
path: root/src/de/podfetcher/feed
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-06-16 20:41:17 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-06-16 20:41:17 +0200
commit324cbdc86c25f905b2e5e4aa0b5f54b377bee309 (patch)
tree3b68b8d445c58eb05148f0242971ca45156581c9 /src/de/podfetcher/feed
parent7a1c8d3ee813fd016dca14aed963738c7ec9e188 (diff)
downloadAntennaPod-324cbdc86c25f905b2e5e4aa0b5f54b377bee309.zip
Feedlist now displays number of new episodes
Diffstat (limited to 'src/de/podfetcher/feed')
-rw-r--r--src/de/podfetcher/feed/Feed.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/de/podfetcher/feed/Feed.java b/src/de/podfetcher/feed/Feed.java
index b411b3ecb..bcec1e55b 100644
--- a/src/de/podfetcher/feed/Feed.java
+++ b/src/de/podfetcher/feed/Feed.java
@@ -30,6 +30,17 @@ public class Feed extends FeedFile {
this(lastUpdate);
this.download_url = url;
}
+
+ /** Returns the number of FeedItems where 'read' is false. */
+ public int getNumOfNewItems() {
+ int count = 0;
+ for (FeedItem item : items) {
+ if (!item.isRead()) {
+ count++;
+ }
+ }
+ return count;
+ }
public String getTitle() {
return title;