This commit is contained in:
Vitaliy 2020-09-18 13:34:10 +03:00
parent da239a69ff
commit e07d6486bf

View file

@ -231,9 +231,13 @@ 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.startsWith(amenity.getName())
|| stopName.contains(amenityName)
|| amenityName.contains(stopName))
&& (nearestStop == null
|| nearestStop.getLocation().equals(stop.getLocation())))
|| stop.getLocation().equals(loc)) {