From 4afef68a1364ad0c3619bccd1e99a99892c2174f Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Mon, 20 Jan 2014 19:40:02 +0100 Subject: fix #3556: Calendar plugin should also read short description for time --- main/src/cgeo/geocaching/Geocache.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main/src/cgeo/geocaching/Geocache.java') diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index b0a229e..364683e 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -1705,8 +1705,9 @@ public class Geocache implements ICache, IWaypoint { patterns.add(Pattern.compile("\\b(\\d{1,2})(?:\\.00)?\\s+" + Pattern.quote(hourLocalized), Pattern.CASE_INSENSITIVE)); } + final String searchText = getShortDescription() + ' ' + getDescription(); for (Pattern pattern : patterns) { - final MatcherWrapper matcher = new MatcherWrapper(pattern, getDescription()); + final MatcherWrapper matcher = new MatcherWrapper(pattern, searchText); while (matcher.find()) { try { final int hours = Integer.parseInt(matcher.group(1)); -- cgit v1.1