'markAllItemsRead' is now working correctly

This commit is contained in:
daniel oeh 2012-08-18 16:23:06 +02:00
parent c4941a3c50
commit 1fefa40c56
1 changed files with 2 additions and 1 deletions

View File

@ -266,6 +266,7 @@ public class FeedManager {
for (FeedItem item : unreadItems) {
item.read = true;
}
final ArrayList<FeedItem> unreadItemsCopy = new ArrayList<FeedItem>(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();