diff options
| author | SammysHP <sven@sammyshp.de> | 2011-08-21 21:53:49 +0200 |
|---|---|---|
| committer | SammysHP <sven@sammyshp.de> | 2011-08-21 21:53:49 +0200 |
| commit | 9735e0fc3203419e186e2830d52e4d88447045c4 (patch) | |
| tree | bc3fa06aca83e8fe6e3fc95bb21158e1289c00cd /src/cgeo/geocaching/cgBase.java | |
| parent | 2a185a9a133821c062d15876104c6c234c323424 (diff) | |
| download | cgeo-9735e0fc3203419e186e2830d52e4d88447045c4.zip cgeo-9735e0fc3203419e186e2830d52e4d88447045c4.tar.gz cgeo-9735e0fc3203419e186e2830d52e4d88447045c4.tar.bz2 | |
Fix #227 (untested because of gc.com is down)
Diffstat (limited to 'src/cgeo/geocaching/cgBase.java')
| -rw-r--r-- | src/cgeo/geocaching/cgBase.java | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/cgeo/geocaching/cgBase.java b/src/cgeo/geocaching/cgBase.java index b1b9a0d..f9ee8c2 100644 --- a/src/cgeo/geocaching/cgBase.java +++ b/src/cgeo/geocaching/cgBase.java @@ -759,16 +759,19 @@ public class cgBase { } // cache direction - image - try { - final Matcher matcherDirection = patternDirection.matcher(row); - while (matcherDirection.find()) { - if (matcherDirection.groupCount() > 0) { - cache.directionImg = matcherDirection.group(1); - } - } - } catch (Exception e) { - // failed to parse direction image - Log.w(cgSettings.tag, "cgeoBase.parseSearch: Failed to parse cache direction image"); + if (settings.loadDirectionImg) + { + try { + final Matcher matcherDirection = patternDirection.matcher(row); + while (matcherDirection.find()) { + if (matcherDirection.groupCount() > 0) { + cache.directionImg = matcherDirection.group(1); + } + } + } catch (Exception e) { + // failed to parse direction image + Log.w(cgSettings.tag, "cgeoBase.parseSearch: Failed to parse cache direction image"); + } } // cache inventory @@ -945,10 +948,13 @@ public class cgBase { } // get direction images - for (cgCache oneCache : caches.cacheList) { - if (oneCache.latitude == null && oneCache.longitude == null && oneCache.direction == null && oneCache.directionImg != null) { - cgDirectionImg.getDrawable(oneCache.geocode, oneCache.directionImg); - } + if (settings.loadDirectionImg) + { + for (cgCache oneCache : caches.cacheList) { + if (oneCache.latitude == null && oneCache.longitude == null && oneCache.directionImg != null) { + cgDirectionImg.getDrawable(oneCache.geocode, oneCache.directionImg); + } + } } // get ratings |
