From 1fefa40c56406c1d08476e19068fc17813ac0d42 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Sat, 18 Aug 2012 16:23:06 +0200 Subject: [PATCH] 'markAllItemsRead' is now working correctly --- src/de/danoeh/antennapod/feed/FeedManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/danoeh/antennapod/feed/FeedManager.java b/src/de/danoeh/antennapod/feed/FeedManager.java index e093601e9..a13a9dcab 100644 --- a/src/de/danoeh/antennapod/feed/FeedManager.java +++ b/src/de/danoeh/antennapod/feed/FeedManager.java @@ -266,6 +266,7 @@ public class FeedManager { for (FeedItem item : unreadItems) { item.read = true; } + final ArrayList unreadItemsCopy = new ArrayList(unreadItems); unreadItems.clear(); sendUnreadItemsUpdateBroadcast(context, null); dbExec.execute(new Runnable() { @@ -274,7 +275,7 @@ public class FeedManager { public void run() { PodDBAdapter adapter = new PodDBAdapter(context); adapter.open(); - for (FeedItem item : unreadItems) { + for (FeedItem item : unreadItemsCopy) { setFeedItem(item, adapter); } adapter.close();