diff options
| author | blafoo <github@blafoo.de> | 2012-05-16 21:10:45 +0200 |
|---|---|---|
| committer | blafoo <github@blafoo.de> | 2012-05-16 21:11:34 +0200 |
| commit | 7ca151c7f43ee085387f1d1fe322fbd174a6d95d (patch) | |
| tree | 71f80def8a2f0cb700512f1c01709376fdef466d | |
| parent | f7ffa6ec91937a81415c6251583d951bbe3abd0e (diff) | |
| download | cgeo-7ca151c7f43ee085387f1d1fe322fbd174a6d95d.zip cgeo-7ca151c7f43ee085387f1d1fe322fbd174a6d95d.tar.gz cgeo-7ca151c7f43ee085387f1d1fe322fbd174a6d95d.tar.bz2 | |
Found caches not hidden for basic members. Fixes #1203
| -rw-r--r-- | main/src/cgeo/geocaching/connector/gc/GCMap.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java index 82ffc7f..1e2754c 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCMap.java +++ b/main/src/cgeo/geocaching/connector/gc/GCMap.java @@ -204,7 +204,16 @@ public class GCMap { } else { cache.setType(CacheType.UNKNOWN); } - searchResult.addCache(cache); + boolean exclude = false; + if (Settings.isExcludeMyCaches() && (cache.isFound() || cache.isOwn())) { // workaround for BM + exclude = true; + } + if (Settings.isExcludeDisabledCaches() && cache.isDisabled()) { + exclude = true; + } + if (!exclude) { + searchResult.addCache(cache); + } } Log.d("Retrieved " + searchResult.getCount() + " caches for tile " + tile.toString()); @@ -280,7 +289,7 @@ public class GCMap { if (tokens != null) { params.put("k", tokens[0], "st", tokens[1]); } - if (Settings.isExcludeMyCaches()) { + if (Settings.isExcludeMyCaches()) { // works only for PM params.put("hf", "1", "hh", "1"); // hide found, hide hidden } if (Settings.getCacheType() == CacheType.TRADITIONAL) { |
