Use CopyOnWriteArrayList for itemlist of feeds instead of ArrayList
This commit is contained in:
parent
71593ddeb3
commit
9a6968ec3b
|
@ -2,10 +2,11 @@ package de.danoeh.antennapod.feed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
import de.danoeh.antennapod.PodcastApp;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
import de.danoeh.antennapod.PodcastApp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data Object for a whole feed
|
* Data Object for a whole feed
|
||||||
|
@ -26,7 +27,7 @@ public class Feed extends FeedFile {
|
||||||
private String author;
|
private String author;
|
||||||
private FeedImage image;
|
private FeedImage image;
|
||||||
private FeedCategory category;
|
private FeedCategory category;
|
||||||
private ArrayList<FeedItem> items;
|
private List<FeedItem> items;
|
||||||
/** Date of last refresh. */
|
/** Date of last refresh. */
|
||||||
private Date lastUpdate;
|
private Date lastUpdate;
|
||||||
private String paymentLink;
|
private String paymentLink;
|
||||||
|
@ -35,7 +36,7 @@ public class Feed extends FeedFile {
|
||||||
|
|
||||||
public Feed(Date lastUpdate) {
|
public Feed(Date lastUpdate) {
|
||||||
super();
|
super();
|
||||||
items = new ArrayList<FeedItem>();
|
items = new CopyOnWriteArrayList<FeedItem>();
|
||||||
this.lastUpdate = lastUpdate;
|
this.lastUpdate = lastUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +124,7 @@ public class Feed extends FeedFile {
|
||||||
this.category = category;
|
this.category = category;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<FeedItem> getItems() {
|
public List<FeedItem> getItems() {
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue