diff options
author | Tom Hennen <TomHennen@users.noreply.github.com> | 2016-04-25 07:56:27 -0400 |
---|---|---|
committer | Tom Hennen <TomHennen@users.noreply.github.com> | 2016-04-25 07:56:27 -0400 |
commit | 9e48147a06bbb8567a05381d484b566e5ea84edf (patch) | |
tree | 73955d3c8e59ea518f2da63bb996ec853dea9c0b | |
parent | 72b8143b780d130e87d48c4830065d338ad3aa66 (diff) | |
parent | 543651bde60ca00b5c91e7565fd214a8dbb2b91e (diff) | |
download | AntennaPod-9e48147a06bbb8567a05381d484b566e5ea84edf.zip |
Merge pull request #1890 from mfietz/issue/1887-new-episodes-not-new
Episodes with same pubDate
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java index 47e2d8a26..75bbd4adc 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java @@ -577,12 +577,13 @@ public final class DBTasks { item.setAutoDownload(savedFeed.getPreferences().getAutoDownload()); savedFeed.getItems().add(idx, item); - // only mark the item new if it actually occurs - // before the most recent item (before we started adding things) + // only mark the item new if it was published after or at the same time + // as the most recent item // (if the most recent date is null then we can assume there are no items // and this is the first, hence 'new') if (priorMostRecentDate == null || - priorMostRecentDate.before(item.getPubDate())) { + priorMostRecentDate.before(item.getPubDate()) || + priorMostRecentDate.equals(item.getPubDate())) { Log.d(TAG, "Marking item published on " + item.getPubDate() + " new, prior most recent date = " + priorMostRecentDate); item.setNew(); |