aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorbananeweizen <bananeweizen@gmx.de>2011-10-30 08:55:44 +0100
committerbananeweizen <bananeweizen@gmx.de>2011-10-30 08:55:44 +0100
commit45d32990df5b6217845f391a487618d5482f035c (patch)
tree57e759e64174822db92a48cde01888d6587893a0 /main
parente9a3d48134241015c08450d8bf355f0b9f5c8e88 (diff)
downloadcgeo-45d32990df5b6217845f391a487618d5482f035c.zip
cgeo-45d32990df5b6217845f391a487618d5482f035c.tar.gz
cgeo-45d32990df5b6217845f391a487618d5482f035c.tar.bz2
fix #722: cache list updated after storing new caches
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/cgeocaches.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/cgeocaches.java b/main/src/cgeo/geocaching/cgeocaches.java
index 1e6ae7f..655f857 100644
--- a/main/src/cgeo/geocaching/cgeocaches.java
+++ b/main/src/cgeo/geocaching/cgeocaches.java
@@ -731,6 +731,14 @@ public class cgeocaches extends AbstractListActivity {
if (loadCachesHandler != null && search != null) {
loadCachesHandler.sendEmptyMessage(0);
}
+
+ // refresh standard list if it has changed (new caches downloaded)
+ if (type == CacheListType.OFFLINE && listId == cgList.STANDARD_LIST_ID && search != null) {
+ cgSearch newSearch = base.searchByOffline(coords, cachetype, listId);
+ if (newSearch != null && newSearch.totalCnt != search.totalCnt) {
+ refreshCurrentList();
+ }
+ }
}
@Override
@@ -1790,7 +1798,7 @@ public class cgeocaches extends AbstractListActivity {
private Handler handler = null;
private Geopoint coords = null;
- private int listId = 1;
+ private int listId = cgList.STANDARD_LIST_ID;
public geocachesLoadByOffline(final Handler handlerIn, final Geopoint coordsIn, int listIdIn) {
handler = handlerIn;
@@ -1803,7 +1811,7 @@ public class cgeocaches extends AbstractListActivity {
if (coords != null) {
search = base.searchByOffline(coords, Settings.getCacheType(), listId);
} else {
- search = base.searchByOffline(null, null, 1);
+ search = base.searchByOffline(null, null, cgList.STANDARD_LIST_ID);
}
handler.sendMessage(new Message());
}