Merge pull request #9842 from osmandapp/fix_9807

Fix_9807
This commit is contained in:
vshcherb 2020-09-18 12:37:21 +02:00 committed by GitHub
commit 59275338d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -231,9 +231,11 @@ public class TransportStopController extends MenuController {
stopAggregated = new TransportStopAggregated();
stopAggregated.setAmenity(amenity);
TransportStop nearestStop = null;
String amenityName = amenity.getName().toLowerCase();
for (TransportStop stop : transportStops) {
stop.setTransportStopAggregated(stopAggregated);
if ((stop.getName().startsWith(amenity.getName())
String stopName = stop.getName().toLowerCase();
if (((stopName.contains(amenityName) || amenityName.contains(stopName))
&& (nearestStop == null
|| nearestStop.getLocation().equals(stop.getLocation())))
|| stop.getLocation().equals(loc)) {