diff options
author | ByteHamster <info@bytehamster.com> | 2022-08-06 10:36:35 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-08-06 15:21:19 +0200 |
commit | 5887a86cecea299e65569847f7dc02772934ec78 (patch) | |
tree | e40f9d74504d6658f9d9427aebdd2240447fa270 /model/src | |
parent | 938df7b7fa024f19194daacfdc78da642a8416ca (diff) | |
download | AntennaPod-5887a86cecea299e65569847f7dc02772934ec78.zip |
Remove favorites tab
Diffstat (limited to 'model/src')
-rw-r--r-- | model/src/main/java/de/danoeh/antennapod/model/feed/FeedItemFilter.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItemFilter.java b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItemFilter.java index c9989e60a..153b81725 100644 --- a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItemFilter.java +++ b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItemFilter.java @@ -75,4 +75,37 @@ public class FeedItemFilter implements Serializable { public boolean isShowDownloaded() { return showDownloaded; } + + public boolean matches(FeedItem item) { + if (showNew && !item.isNew()) { + return false; + } else if (showPlayed && !item.isPlayed()) { + return false; + } else if (showUnplayed && item.isPlayed()) { + return false; + } else if (showPaused && !item.isInProgress()) { + return false; + } else if (showNotPaused && item.isInProgress()) { + return false; + } else if (showNew && !item.isNew()) { + return false; + } else if (showQueued && !item.isTagged(FeedItem.TAG_QUEUE)) { + return false; + } else if (showNotQueued && item.isTagged(FeedItem.TAG_QUEUE)) { + return false; + } else if (showDownloaded && !item.isDownloaded()) { + return false; + } else if (showNotDownloaded && item.isDownloaded()) { + return false; + } else if (showHasMedia && !item.hasMedia()) { + return false; + } else if (showNoMedia && item.hasMedia()) { + return false; + } else if (showIsFavorite && !item.isTagged(FeedItem.TAG_FAVORITE)) { + return false; + } else if (showNotFavorite && item.isTagged(FeedItem.TAG_FAVORITE)) { + return false; + } + return true; + } } |