Merge pull request #4672 from ByteHamster/fix-update-without-pubdate

Fixed updating feeds where some items do not have a pubdate
This commit is contained in:
ByteHamster 2020-11-11 21:56:59 +01:00 committed by GitHub
commit eea503e3e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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()