diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-08-31 12:51:26 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-08-31 12:51:26 +0200 |
commit | cc3863d7b2206bee0ddcf90576c8427429479fa4 (patch) | |
tree | 3338f55a733ebca4ecdb3bffc83d550d696a135b /src/de/danoeh/antennapod | |
parent | 42a39b3cfc2b696278627584c1d5fae88a0f73a0 (diff) | |
download | AntennaPod-cc3863d7b2206bee0ddcf90576c8427429479fa4.zip |
New episodes weren't marked as unread
Diffstat (limited to 'src/de/danoeh/antennapod')
-rw-r--r-- | src/de/danoeh/antennapod/storage/DBTasks.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/de/danoeh/antennapod/storage/DBTasks.java b/src/de/danoeh/antennapod/storage/DBTasks.java index 741699bdf..ba2e743a8 100644 --- a/src/de/danoeh/antennapod/storage/DBTasks.java +++ b/src/de/danoeh/antennapod/storage/DBTasks.java @@ -28,6 +28,7 @@ import de.danoeh.antennapod.service.download.DownloadStatus; import de.danoeh.antennapod.util.DownloadError; import de.danoeh.antennapod.util.NetworkUtils; import de.danoeh.antennapod.util.QueueAccess; +import de.danoeh.antennapod.util.comparator.FeedItemPubdateComparator; import de.danoeh.antennapod.util.exception.MediaFileNotFoundException; /** @@ -568,6 +569,7 @@ public final class DBTasks { Log.d(TAG, "Feed with title " + newFeed.getTitle() + " already exists. Syncing new with existing one."); + Collections.sort(newFeed.getItems(), new FeedItemPubdateComparator()); savedFeed.setItems(DBReader.getFeedItemList(context, savedFeed)); if (savedFeed.compareWithOther(newFeed)) { if (AppConfig.DEBUG) @@ -585,7 +587,7 @@ public final class DBTasks { final int i = idx; item.setFeed(savedFeed); savedFeed.getItems().add(i, item); - DBWriter.markItemRead(context, item.getId(), false); + item.setRead(false); } else { oldItem.updateFromOther(item); } |