aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/maps
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2013-01-13 10:55:50 +0100
committerSamuel Tardieu <sam@rfc1149.net>2013-01-13 11:04:57 +0100
commit4eac6e33882ebd8e6383f99a00f6911c90b1e5b0 (patch)
tree1de01b0c06204ad0e01861d1a72c3128a6210cf0 /main/src/cgeo/geocaching/maps
parent6f385790904ff9a23040798bfce89bb847ccf6b8 (diff)
downloadcgeo-4eac6e33882ebd8e6383f99a00f6911c90b1e5b0.zip
cgeo-4eac6e33882ebd8e6383f99a00f6911c90b1e5b0.tar.gz
cgeo-4eac6e33882ebd8e6383f99a00f6911c90b1e5b0.tar.bz2
Readding entries to a LRUSet already updates their freshness
Diffstat (limited to 'main/src/cgeo/geocaching/maps')
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index d9a1b3d..af45b6f6 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1135,8 +1135,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
downloaded = true;
Set<cgCache> cachesFromSearchResult = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_WAYPOINTS);
- // to update the caches they have to be removed first
- caches.removeAll(cachesFromSearchResult);
+ // update the caches
caches.addAll(cachesFromSearchResult);
if (mapMode == MapMode.LIVE) {
@@ -1225,8 +1224,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (searchResult != null) {
Set<cgCache> result = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB);
- // to update the caches they have to be removed first
- caches.removeAll(result);
+ // update the caches
caches.addAll(result);
lastSearchResult = searchResult;
}