diff options
Diffstat (limited to 'main/src/cgeo/geocaching/maps/CGeoMap.java')
| -rw-r--r-- | main/src/cgeo/geocaching/maps/CGeoMap.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index 434eb05..0038807 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -15,6 +15,7 @@ import cgeo.geocaching.cgWaypoint; import cgeo.geocaching.cgeoapplication; import cgeo.geocaching.cgeocaches; import cgeo.geocaching.activity.ActivityMixin; +import cgeo.geocaching.connector.ConnectorFactory; import cgeo.geocaching.connector.gc.GCBase; import cgeo.geocaching.enumerations.CacheType; import cgeo.geocaching.enumerations.LoadFlags; @@ -1266,8 +1267,10 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto } if (tokens == null) { - // token = cgBase.getMapUserToken(noMapTokenHandler); tokens = GCBase.getTokens(); + if (noMapTokenHandler != null && tokens == null) { + noMapTokenHandler.sendEmptyMessage(0); + } } if (stop) { @@ -1276,7 +1279,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto final Viewport viewport = new Viewport(new Geopoint(latMin, lonMin), new Geopoint(latMax, lonMax)); // search = cgBase.searchByViewport(token, viewport); - search = GCBase.searchByViewport(viewport, tokens); + search = ConnectorFactory.searchByViewport(viewport, tokens); if (search != null) { downloaded = true; if (search.error == StatusCode.NOT_LOGGED_IN) { @@ -1846,12 +1849,13 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto int hashcode = new HashCodeBuilder() .append(cache.isReliableLatLon()) .append(cache.getType().id) - .append(cache.isDisabled()) + .append(cache.isDisabled() || cache.isArchived()) .append(cache.isOwn()) .append(cache.isFound()) .append(cache.hasUserModifiedCoords()) .append(cache.getPersonalNote()) .append(cache.isLogOffline()) + .append(cache.getListId() > 0) .toHashCode(); LayerDrawable ldFromCache = CGeoMap.overlaysCache.get(hashcode); @@ -1866,7 +1870,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto // background: disabled or not Drawable marker = getResources().getDrawable(R.drawable.marker); - if (cache.isDisabled()) { + if (cache.isDisabled() || cache.isArchived()) { marker = getResources().getDrawable(R.drawable.marker_disabled); } layers.add(marker); @@ -1883,6 +1887,10 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto if ( cache.isOwn() ) { layers.add(getResources().getDrawable(R.drawable.marker_own)); insets.add(INSET_OWN[resolution]); + // if not, checked if stored + } else if (cache.getListId() > 0) { + layers.add(getResources().getDrawable(R.drawable.marker_stored)); + insets.add(INSET_OWN[resolution]); } // found if (cache.isFound()) { |
