aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index 29c8934..a341333 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -335,9 +335,6 @@ public class CacheDetailActivity extends AbstractActivity {
if (geolocation == null) {
geolocation = app.startGeo(locationUpdater);
}
- if (cache != null) {
- cache.setChangeNotificationHandler(cacheChangeNotificationHandler);
- }
if (refreshOnResume) {
notifyDataSetChanged();
refreshOnResume = false;
@@ -634,6 +631,11 @@ public class CacheDetailActivity extends AbstractActivity {
// Data loaded, we're ready to show it!
notifyDataSetChanged();
+ // cache isn't available until after notifyDataSetChanged is called
+ if (cache != null) {
+ cache.setChangeNotificationHandler(cacheChangeNotificationHandler);
+ }
+
}
}