From 711eac31cda82e1b1c190695343450740cc5d985 Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 6 May 2014 11:55:34 +0200 Subject: Update changelog_release.xml - Adapted to new format - Some wording corrections - Milestone Corrected - Appended section for possible next bugfix release --- main/res/values/changelog_release.xml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'main') diff --git a/main/res/values/changelog_release.xml b/main/res/values/changelog_release.xml index a9ada95..f1c56ca 100644 --- a/main/res/values/changelog_release.xml +++ b/main/res/values/changelog_release.xml @@ -2,20 +2,23 @@ \n + Next bugfix release:\n + · New: + · Fix: + \n + \n 2014.04.30:\n - New features:\n - · Support new cache-type: Giga-Event\n - · Integrate with MapsWithMe\n - · Import external spoiler images from a Garmin-style file structure\n - · Support more details in GPX export\n - Bugfixing:\n - · Fixed a number of crash scenarios/instabilities due to memory issues\n - · Fixed problems when calling some external navigation apps\n - · Fixed a crash when starting with a readonly cache directory\n - · Have attended as default log type on day of event\n + · New: Support new cache type: Giga Event\n + · New: Integrate with MapsWithMe\n + · New: Import external spoiler images from a Garmin-style file structure\n + · New: Support more details in GPX export\n + · Fix: A number of crash scenarios/instabilities due to memory issues\n + · Fix: Problems when calling some external navigation apps\n + · Fix: Crash when starting with a readonly cache directory\n + · New: Have attended as default log type on day of event\n \n \n - Detailed list of all changes\n + Detailed list of all changes\n \n Old releases\n · Please refer to the release notes on the c:geo-website.\n -- cgit v1.1 From 5f85f3b82eebd45337087afac23eb6adfdc8ea59 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Tue, 13 May 2014 23:02:53 +0200 Subject: fix #3836: cache type is no longer recognized due to gc.com change --- main/src/cgeo/geocaching/connector/gc/GCConstants.java | 2 +- main/src/cgeo/geocaching/connector/gc/GCParser.java | 2 +- main/src/cgeo/geocaching/enumerations/CacheType.java | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'main') diff --git a/main/src/cgeo/geocaching/connector/gc/GCConstants.java b/main/src/cgeo/geocaching/connector/gc/GCConstants.java index 5ee8993..305ac6f 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCConstants.java +++ b/main/src/cgeo/geocaching/connector/gc/GCConstants.java @@ -47,7 +47,7 @@ public final class GCConstants { public final static Pattern PATTERN_FOUND_ALTERNATIVE = Pattern.compile("
Logged on: ([^<]+?)<"); public final static Pattern PATTERN_OWNER_DISPLAYNAME = Pattern.compile("
[^<]+([^<]+)"); - public final static Pattern PATTERN_TYPE = Pattern.compile("\"([^\"]+?)\"[^]*>"); + public final static Pattern PATTERN_TYPE = Pattern.compile("\\W*Hidden[\\s:]*([^<]+?)
"); public final static Pattern PATTERN_HIDDENEVENT = Pattern.compile("Event\\s*Date\\s*:\\s*([^<]+)
", Pattern.DOTALL); public final static Pattern PATTERN_FAVORITE = Pattern.compile("
"); // without 'class="hideMe"' inside the tag ! diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java index 0549b3f..5422c11 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCParser.java +++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java @@ -488,7 +488,7 @@ public abstract class GCParser { cache.setFound(TextUtils.matches(page, GCConstants.PATTERN_FOUND) || TextUtils.matches(page, GCConstants.PATTERN_FOUND_ALTERNATIVE)); // cache type - cache.setType(CacheType.getByPattern(TextUtils.getMatch(page, GCConstants.PATTERN_TYPE, true, cache.getType().id))); + cache.setType(CacheType.getByGuid(TextUtils.getMatch(page, GCConstants.PATTERN_TYPE, true, cache.getType().id))); // on watchlist cache.setOnWatchlist(TextUtils.matches(page, GCConstants.PATTERN_WATCHLIST)); diff --git a/main/src/cgeo/geocaching/enumerations/CacheType.java b/main/src/cgeo/geocaching/enumerations/CacheType.java index 506c791..535bfab 100644 --- a/main/src/cgeo/geocaching/enumerations/CacheType.java +++ b/main/src/cgeo/geocaching/enumerations/CacheType.java @@ -58,15 +58,19 @@ public enum CacheType { private final static Map FIND_BY_ID; private final static Map FIND_BY_PATTERN; + private final static Map FIND_BY_GUID; static { final HashMap mappingId = new HashMap(); final HashMap mappingPattern = new HashMap(); + final HashMap mappingGuid = new HashMap(); for (CacheType ct : values()) { mappingId.put(ct.id, ct); mappingPattern.put(ct.pattern.toLowerCase(Locale.US), ct); + mappingGuid.put(ct.guid, ct); } FIND_BY_ID = Collections.unmodifiableMap(mappingId); FIND_BY_PATTERN = Collections.unmodifiableMap(mappingPattern); + FIND_BY_GUID = Collections.unmodifiableMap(mappingGuid); } public static CacheType getById(final String id) { @@ -85,6 +89,14 @@ public enum CacheType { return result; } + public static CacheType getByGuid(final String id) { + final CacheType result = (id != null) ? CacheType.FIND_BY_GUID.get(id) : null; + if (result == null) { + return UNKNOWN; + } + return result; + } + public final String getL10n() { return CgeoApplication.getInstance().getBaseContext().getResources().getString(stringId); } -- cgit v1.1