aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-05-24 10:19:23 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-05-24 10:19:23 +0200
commitb91529a6aaf8ac2460ec18cddcafc0d41f83f8b6 (patch)
tree9049ae53bfce984fe8331355889231d955bb48e7
parente1652c16405ff34aa6272ba775e94127bb2c89b0 (diff)
downloadcgeo-b91529a6aaf8ac2460ec18cddcafc0d41f83f8b6.zip
cgeo-b91529a6aaf8ac2460ec18cddcafc0d41f83f8b6.tar.gz
cgeo-b91529a6aaf8ac2460ec18cddcafc0d41f83f8b6.tar.bz2
fix #3980: re-initialize sort order after switch to history
-rw-r--r--main/src/cgeo/geocaching/CacheListActivity.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/CacheListActivity.java b/main/src/cgeo/geocaching/CacheListActivity.java
index c681d00..333dfb7 100644
--- a/main/src/cgeo/geocaching/CacheListActivity.java
+++ b/main/src/cgeo/geocaching/CacheListActivity.java
@@ -1038,11 +1038,13 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
registerForContextMenu(list);
adapter = new CacheListAdapter(this, cacheList, type);
- listFooter = getLayoutInflater().inflate(R.layout.cacheslist_footer, null);
- listFooter.setClickable(true);
- listFooter.setOnClickListener(new MoreCachesListener());
- listFooterText = (TextView) listFooter.findViewById(R.id.more_caches);
- list.addFooterView(listFooter);
+ if (listFooter == null) {
+ listFooter = getLayoutInflater().inflate(R.layout.cacheslist_footer, null);
+ listFooter.setClickable(true);
+ listFooter.setOnClickListener(new MoreCachesListener());
+ listFooterText = (TextView) listFooter.findViewById(R.id.more_caches);
+ list.addFooterView(listFooter);
+ }
setListAdapter(adapter);
adapter.forceSort();
}
@@ -1441,6 +1443,8 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
Settings.saveLastList(listId);
+ initAdapter();
+
showProgress(true);
showFooterLoadingCaches();
DataStore.moveToList(adapter.getCheckedCaches(), listId);