'markAllItemsRead' is now working correctly
This commit is contained in:
parent
c4941a3c50
commit
1fefa40c56
|
@ -266,6 +266,7 @@ public class FeedManager {
|
||||||
for (FeedItem item : unreadItems) {
|
for (FeedItem item : unreadItems) {
|
||||||
item.read = true;
|
item.read = true;
|
||||||
}
|
}
|
||||||
|
final ArrayList<FeedItem> unreadItemsCopy = new ArrayList<FeedItem>(unreadItems);
|
||||||
unreadItems.clear();
|
unreadItems.clear();
|
||||||
sendUnreadItemsUpdateBroadcast(context, null);
|
sendUnreadItemsUpdateBroadcast(context, null);
|
||||||
dbExec.execute(new Runnable() {
|
dbExec.execute(new Runnable() {
|
||||||
|
@ -274,7 +275,7 @@ public class FeedManager {
|
||||||
public void run() {
|
public void run() {
|
||||||
PodDBAdapter adapter = new PodDBAdapter(context);
|
PodDBAdapter adapter = new PodDBAdapter(context);
|
||||||
adapter.open();
|
adapter.open();
|
||||||
for (FeedItem item : unreadItems) {
|
for (FeedItem item : unreadItemsCopy) {
|
||||||
setFeedItem(item, adapter);
|
setFeedItem(item, adapter);
|
||||||
}
|
}
|
||||||
adapter.close();
|
adapter.close();
|
||||||
|
|
Loading…
Reference in New Issue