diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2015-12-13 11:08:57 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2015-12-13 11:09:10 +0100 |
commit | a4dea4ba249df239ee5f2ce358c2a21e5912155c (patch) | |
tree | 50dde45987e72e3b7a66d80dc8f6c4ad6c0ddd7e /core/src/main | |
parent | 3bb8d9304a60207d05cf398f21cc5ba1cc7f8402 (diff) | |
download | AntennaPod-a4dea4ba249df239ee5f2ce358c2a21e5912155c.zip |
(1) Fix refresh indicator (2) On download event, only refresh items that are affected
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java b/core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java index 3817d3361..892e5ff38 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java @@ -29,6 +29,16 @@ public class FeedItemUtil { return -1; } + public static int indexOfItemWithMediaId(List<FeedItem> items, long mediaId) { + for(int i=0; i < items.size(); i++) { + FeedItem item = items.get(i); + if(item != null && item.getMedia() != null && item.getMedia().getId() == mediaId) { + return i; + } + } + return -1; + } + public static long[] getIds(FeedItem... items) { if(items == null || items.length == 0) { return new long[0]; |