summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2020-11-11 21:56:59 +0100
committerGitHub <noreply@github.com>2020-11-11 21:56:59 +0100
commiteea503e3e09742c69f65d873382f8a159e34bb0a (patch)
tree3b2cf64c84a4be5017a4b7bdeaf014939279bc06
parent283dcfcc466c8fdc06b6e6740544f883961db236 (diff)
parentfe3a44d5fa50f9b011c6f0f884566e05b47c7e7a (diff)
downloadAntennaPod-eea503e3e09742c69f65d873382f8a159e34bb0a.zip
Merge pull request #4672 from ByteHamster/fix-update-without-pubdate
Fixed updating feeds where some items do not have a pubdate
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java3
1 files changed, 2 insertions, 1 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 c059e696a..3f6a56fc8 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
@@ -445,7 +445,8 @@ public final class DBTasks {
// 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
+ // New items that do not have a pubDate set are always marked as new
+ if (item.getPubDate() == null || priorMostRecentDate == null
|| priorMostRecentDate.before(item.getPubDate())
|| priorMostRecentDate.equals(item.getPubDate())) {
Log.d(TAG, "Marking item published on " + item.getPubDate()