summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/fragment
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2013-09-21 12:11:06 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2013-09-21 12:11:06 +0200
commit0b0ea77df1bde38bf211c68e54be45541080e2c7 (patch)
tree98bfbf41368a1b8ff00ee033a77130d0566c7f8a /src/de/danoeh/antennapod/fragment
parent4d50903182ec3839012408b34ddf8705f5b3ffb3 (diff)
downloadAntennaPod-0b0ea77df1bde38bf211c68e54be45541080e2c7.zip
Fixed crashes in FeedItemlist
Diffstat (limited to 'src/de/danoeh/antennapod/fragment')
-rw-r--r--src/de/danoeh/antennapod/fragment/ItemlistFragment.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/de/danoeh/antennapod/fragment/ItemlistFragment.java b/src/de/danoeh/antennapod/fragment/ItemlistFragment.java
index 282bb4d5c..436210a70 100644
--- a/src/de/danoeh/antennapod/fragment/ItemlistFragment.java
+++ b/src/de/danoeh/antennapod/fragment/ItemlistFragment.java
@@ -125,21 +125,24 @@ public class ItemlistFragment extends ListFragment {
}
@Override
- public void onDestroyView() {
- super.onDestroyView();
+ public void onStop() {
+ super.onStop();
EventDistributor.getInstance().unregister(contentUpdate);
if (currentLoadTask != null) {
currentLoadTask.cancel(true);
}
}
- protected void loadData() {
+ protected synchronized void loadData() {
final long feedId;
if (feed == null) {
feedId = getArguments().getLong(ARGUMENT_FEED_ID);
} else {
feedId = feed.getId();
}
+ if (currentLoadTask != null) {
+ currentLoadTask.cancel(true);
+ }
AsyncTask<Long, Void, Feed> loadTask = new AsyncTask<Long, Void, Feed>(){
private volatile List<Long> queueRef;