From 7db2c569a8611e8813bdb3e19ef24680b4f6f46b Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 13 Sep 2018 17:03:00 +0300 Subject: [PATCH] improve check in filter for routes --- .../net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index 03cb16a848..1aa87286cd 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -669,7 +669,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo private List filterTransportRoutes(List routes) { List 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); } }