diff options
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
| -rw-r--r-- | main/src/cgeo/geocaching/Geocache.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index bded7d0..241f180 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -1813,4 +1813,21 @@ public class Geocache implements ICache, IWaypoint { public String getWaypointPrefix(String name) { return getConnector().getWaypointPrefix(name); } + + /** + * Get number of overall finds for a cache, or 0 if the number of finds is not known. + * + * @return + */ + public int getFindsCount() { + if (getLogCounts().isEmpty()) { + setLogCounts(DataStore.loadLogCounts(getGeocode())); + } + Integer logged = getLogCounts().get(LogType.FOUND_IT); + if (logged != null) { + return logged; + } + return 0; + } + } |
