private SortType getAutoType() {
        if (CacheListType.FINDER.equals(listType)) {
            return SortType.LAST_FOUND;
        }
        if (CacheListType.HISTORY.equals(listType)) {
            return SortType.LOGGED_DATE;
        }
        if (isEventList) {
            return SortType.EVENT_DATE;
        }
        if (isSeriesList) {
            return SortType.NAME;
        }
        if (targetCoords != null) {
            return SortType.TARGET_DISTANCE;
        }
        return SortType.DISTANCE;
    }
Sets sort context depending on a list context.
main/src/main/java/cgeo/geocaching/sorting/GeocacheSort.java