--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureFetcher.java 2011/04/01 14:19:58 1251 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureFetcher.java 2011/04/04 08:27:24 1252 @@ -75,7 +75,7 @@ StationEntry station = stationDao.getById(stationID); departureBean.stationName = station.getName(); - + if (station.getRegional() != null && (type == FetchTrainType.REGIONAL||type == FetchTrainType.BOTH) ) { DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival); departureBean.entries.addAll( tempBean.entries ); @@ -92,7 +92,9 @@ logger.info("No departures found for station " + stationID); } - Collections.sort( departureBean.entries ); + if (type == FetchTrainType.BOTH) { //if we have both S-tog and regional order by departure/arrival time + Collections.sort( departureBean.entries ); + } return departureBean;