From 613bd2072c4622d0156a14737e89203940bb5535 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Thu, 27 Mar 2014 08:35:48 +0100 Subject: fix #2906: newly loaded found caches are added to the history The `visitedDate` field indicates that a cache has been recently logged. It was previously set from the found date when loading a cache from geocaching.com, which caused the extra insertion. --- main/src/cgeo/geocaching/connector/gc/GCParser.java | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'main/src/cgeo/geocaching/connector/gc/GCParser.java') diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java index 60fb8e1..56d434d 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCParser.java +++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java @@ -486,17 +486,6 @@ public abstract class GCParser { // cache found cache.setFound(TextUtils.matches(page, GCConstants.PATTERN_FOUND) || TextUtils.matches(page, GCConstants.PATTERN_FOUND_ALTERNATIVE)); - // cache found date - try { - final String foundDateString = TextUtils.getMatch(page, GCConstants.PATTERN_FOUND_DATE, true, null); - if (StringUtils.isNotBlank(foundDateString)) { - cache.setVisitedDate(GCLogin.parseGcCustomDate(foundDateString).getTime()); - } - } catch (final ParseException e) { - // failed to parse cache found date - Log.w("GCParser.parseCache: Failed to parse cache found date"); - } - // cache type cache.setType(CacheType.getByPattern(TextUtils.getMatch(page, GCConstants.PATTERN_TYPE, true, cache.getType().id))); -- cgit v1.1