private void updateSortBar() {
        final View sortView = this.findViewById(R.id.sort_bar);
        final GeocacheSort.SortType st = sortContext.getSort().getType();
        if (st == null || GeocacheSort.SortType.AUTO.equals(st) || CacheListType.HISTORY.equals(type)) {
            sortView.setVisibility(View.GONE);
        } else {
            sortView.setVisibility(View.VISIBLE);
            final TextView sortTextView = findViewById(R.id.sort_text);
            sortTextView.setText(sortContext.getSort().getDisplayName());
        }
    }
Extract a cache from adapter data.

@param adapterInfo an adapterInfo
@return the pointed cache
main/src/main/java/cgeo/geocaching/CacheListActivity.java