private boolean refreshWithSortType(final GeocacheSort.SortType sortType) {
        sortContext.getSort().setAndToggle(sortType);
        sortContext.save();
        adapter.forceSort();
        updateSortBar();
        refreshCurrentList();
        //for online searches, restart search with new sort argument
        if (type.isOnline && type != CacheListType.POCKET) {
            restartCacheLoader(false, null);
        }

        return true;
    }
Check if the list is empty and prompt for deletion
main/src/main/java/cgeo/geocaching/CacheListActivity.java