fix #5343
This commit is contained in:
parent
66e88266e6
commit
6dd770c36c
2 changed files with 22 additions and 1 deletions
|
@ -521,7 +521,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<TransportStopRoute> getSubTransportStopRoutes(boolean nearby) {
|
protected List<TransportStopRoute> getSubTransportStopRoutes(boolean nearby) {
|
||||||
List<TransportStopRoute> allRoutes = getTransportStopRoutes();
|
List<TransportStopRoute> allRoutes = getTransportStopRoutes();
|
||||||
if (allRoutes != null) {
|
if (allRoutes != null) {
|
||||||
List<TransportStopRoute> res = new ArrayList<>();
|
List<TransportStopRoute> res = new ArrayList<>();
|
||||||
|
|
|
@ -178,6 +178,24 @@ public class AmenityMenuController extends MenuController {
|
||||||
return routes;
|
return routes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<TransportStopRoute> getSubTransportStopRoutes(boolean nearby) {
|
||||||
|
List<TransportStopRoute> allRoutes = getTransportStopRoutes();
|
||||||
|
if (allRoutes != null) {
|
||||||
|
List<TransportStopRoute> res = new ArrayList<>();
|
||||||
|
for (TransportStopRoute route : allRoutes) {
|
||||||
|
boolean isCurrentRouteLocal = route.refStop != null && route.refStop.getName().equals(route.stop.getName());
|
||||||
|
if (!nearby && isCurrentRouteLocal) {
|
||||||
|
res.add(route);
|
||||||
|
} else if (nearby && route.refStop == null) {
|
||||||
|
res.add(route);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addPlainMenuItems(String typeStr, PointDescription pointDescription, LatLon latLon) {
|
public void addPlainMenuItems(String typeStr, PointDescription pointDescription, LatLon latLon) {
|
||||||
}
|
}
|
||||||
|
@ -261,6 +279,9 @@ public class AmenityMenuController extends MenuController {
|
||||||
r.desc = useEnglishNames ? rs.getEnName(true) : rs.getName();
|
r.desc = useEnglishNames ? rs.getEnName(true) : rs.getName();
|
||||||
r.route = rs;
|
r.route = rs;
|
||||||
r.stop = s;
|
r.stop = s;
|
||||||
|
if (amenity.getLocation().equals(s.getLocation()) || (isSubwayEntrance && type == TransportStopType.SUBWAY)) {
|
||||||
|
r.refStop = s;
|
||||||
|
}
|
||||||
r.distance = dist;
|
r.distance = dist;
|
||||||
this.routes.add(r);
|
this.routes.add(r);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue