improve check in filter for routes

This commit is contained in:
Chumva 2018-09-13 17:03:00 +03:00
parent 6c0895b6e9
commit 7db2c569a8

View file

@ -669,7 +669,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
private List<TransportStopRoute> filterTransportRoutes(List<TransportStopRoute> routes) {
List<TransportStopRoute> filteredRoutes = new ArrayList<>();
for (TransportStopRoute route : routes) {
if (!containsRef(filteredRoutes, route.route) && filteredRoutes.size() < 6) {
if (filteredRoutes.size() < 6 && !containsRef(filteredRoutes, route.route)) {
filteredRoutes.add(route);
}
}