diff options
| author | Bananeweizen <Bananeweizen@gmx.de> | 2013-06-14 21:20:52 -0700 |
|---|---|---|
| committer | Bananeweizen <Bananeweizen@gmx.de> | 2013-06-14 21:20:52 -0700 |
| commit | 3d41a7c9b48fea09d6cc74cd96fa1a13b777eeb2 (patch) | |
| tree | 53dcfe6c7af110c5575e1a12bb222348ce9863e5 /main/src | |
| parent | 45ad8a3ee4498abc0bab3cf87fb40f5e154071f9 (diff) | |
| parent | 947df888d1b90c24a5c0d18d0ed9a2eed73868ab (diff) | |
| download | cgeo-3d41a7c9b48fea09d6cc74cd96fa1a13b777eeb2.zip cgeo-3d41a7c9b48fea09d6cc74cd96fa1a13b777eeb2.tar.gz cgeo-3d41a7c9b48fea09d6cc74cd96fa1a13b777eeb2.tar.bz2 | |
Merge pull request #2891 from campbeb/fix2882
Fix #2882 - Clear offline log through cache object
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/Geocache.java | 5 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/LogCacheActivity.java | 4 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/ui/LoggingUI.java | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index 781f9ff..1972c7a 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -490,6 +490,11 @@ public class Geocache implements ICache, IWaypoint { } } + public void clearOfflineLog() { + cgData.clearLogOffline(geocode); + notifyChange(); + } + public List<LogType> getPossibleLogTypes() { final List<LogType> logTypes = new ArrayList<LogType>(); if (isEventCache()) { diff --git a/main/src/cgeo/geocaching/LogCacheActivity.java b/main/src/cgeo/geocaching/LogCacheActivity.java index e4d3d17..62c94ce 100644 --- a/main/src/cgeo/geocaching/LogCacheActivity.java +++ b/main/src/cgeo/geocaching/LogCacheActivity.java @@ -368,7 +368,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia } private void clearLog() { - cgData.clearLogOffline(geocode); + cache.clearOfflineLog(); setDefaultValues(); @@ -533,7 +533,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia } cgData.saveChangedCache(cache); - cgData.clearLogOffline(geocode); + cache.clearOfflineLog(); if (typeSelected == LogType.FOUND_IT) { if (tweetCheck.isChecked() && tweetBox.getVisibility() == View.VISIBLE) { diff --git a/main/src/cgeo/geocaching/ui/LoggingUI.java b/main/src/cgeo/geocaching/ui/LoggingUI.java index 1ba15a2..ac74dd3 100644 --- a/main/src/cgeo/geocaching/ui/LoggingUI.java +++ b/main/src/cgeo/geocaching/ui/LoggingUI.java @@ -104,7 +104,7 @@ public class LoggingUI extends AbstractUIFactory { break; case CLEAR_LOG: - cgData.clearLogOffline(cache.getGeocode()); + cache.clearOfflineLog(); break; } } else { |
