diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2015-10-25 13:06:05 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2015-10-25 14:00:50 +0100 |
commit | 89e67f09192a44319e45b3f9b71e58108b10c951 (patch) | |
tree | 2fcf90eb30c2b7e8edd2255141076f595c7685a4 /core/src/main | |
parent | 6a94b07f7ec6914ca8d83d7a7bb68f046c8f9ec2 (diff) | |
download | AntennaPod-89e67f09192a44319e45b3f9b71e58108b10c951.zip |
Replace loader
Replace with lambda
Replace Loader with Observable
onResume and onPause instead of onStart and onStop; minor changes
Makes more sense to load data once at start
Reorder functions to mirror lifecycle
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/event/QueueEvent.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/event/QueueEvent.java b/core/src/main/java/de/danoeh/antennapod/core/event/QueueEvent.java index 4d59d75eb..4992252d1 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/event/QueueEvent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/event/QueueEvent.java @@ -41,6 +41,18 @@ public class QueueEvent { this.position = position; } + public boolean contains(long id) { + if(item != null) { + return item.getId() == id; + } + for(FeedItem item : items) { + if(item.getId() == id) { + return true; + } + } + return false; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) |