From d500f3f0637b60da4f50c32a64de3eaa0ffd3f79 Mon Sep 17 00:00:00 2001 From: rsudev Date: Sat, 6 Jul 2013 18:41:43 +0200 Subject: Fixes #2925, Cache logbook not updated correctly CacheLogbookViewCreater was running on a stale Geocache instance --- main/src/cgeo/geocaching/CacheDetailActivity.java | 8 +++++-- .../geocaching/ui/logs/CacheLogsViewCreator.java | 27 +++++++++++++++------- 2 files changed, 25 insertions(+), 10 deletions(-) (limited to 'main') diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index 9c03401..5ac348c 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -2409,10 +2409,10 @@ public class CacheDetailActivity extends AbstractViewPagerActivity getLogs() { - return allLogs ? cache.getLogs() : cache.getFriendsLogs(); + return allLogs ? getCache().getLogs() : getCache().getFriendsLogs(); } @Override protected void addHeaderView() { // adds the log counts - final Map logCounts = cache.getLogCounts(); + final Map logCounts = getCache().getLogCounts(); if (logCounts != null) { final List> sortedLogCounts = new ArrayList>(logCounts.size()); for (final Entry entry : logCounts.entrySet()) { @@ -85,17 +96,17 @@ public class CacheLogsViewCreator extends LogsViewCreator { @Override protected boolean isValid() { - return cache != null; + return getCache() != null; } @Override protected String getGeocode() { - return cache.getGeocode(); + return getCache().getGeocode(); } @Override protected UserActionsClickListener createUserActionsListener() { - return new UserActionsClickListener(cache); + return new UserActionsClickListener(getCache()); } } \ No newline at end of file -- cgit v1.1