From cc3863d7b2206bee0ddcf90576c8427429479fa4 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Sat, 31 Aug 2013 12:51:26 +0200 Subject: New episodes weren't marked as unread --- src/de/danoeh/antennapod/storage/DBTasks.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/de') 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); } -- cgit v1.2.3