private boolean openSortDialog() {
        final List<Pair<GeocacheSort.SortType, String>> availableTypes = sortContext.getSort().getAvailableTypes();
        final List<GeocacheSort.SortType> typeList = new ArrayList<>();
        final HashMap<GeocacheSort.SortType, String> typeToString = new HashMap<>();
        for (Pair<GeocacheSort.SortType, String> entry : availableTypes) {
            typeToString.put(entry.first, entry.second);
            typeList.add(entry.first);
        }

        final SimpleDialog.ItemSelectModel<GeocacheSort.SortType> model = new SimpleDialog.ItemSelectModel<>();
        model
                .setScrollAnchor(sortContext.getSort().getType())
                .setChoiceMode(SimpleItemListModel.ChoiceMode.SINGLE_RADIO)
                .setItems(typeList)
                .setSelectedItems(Collections.singleton(sortContext.getSort().getType()))
                .setDisplayMapper((f) -> TextParam.text(typeToString.get(f)));

        SimpleDialog.of(this).setTitle(R.string.caches_sort)
                .selectSingle(model, this::refreshWithSortType);

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