Fix #3577 Announce only visible favorites
This commit is contained in:
parent
5035ecb061
commit
6523575e1d
2 changed files with 11 additions and 1 deletions
|
@ -433,6 +433,16 @@ public class FavouritesDbHelper {
|
|||
return cachedFavoritePoints;
|
||||
}
|
||||
|
||||
public List<FavouritePoint> getVisibleFavouritePoints() {
|
||||
List<FavouritePoint> fp = new ArrayList<>();
|
||||
for(FavouritePoint p : cachedFavoritePoints) {
|
||||
if(p.isVisible()) {
|
||||
fp.add(p);
|
||||
}
|
||||
}
|
||||
return fp;
|
||||
}
|
||||
|
||||
|
||||
public List<FavoriteGroup> getFavoriteGroups() {
|
||||
return favoriteGroups;
|
||||
|
|
|
@ -473,7 +473,7 @@ public class WaypointHelper {
|
|||
if ((type == FAVORITES || all)) {
|
||||
final List<LocationPointWrapper> array = clearAndGetArray(locationPoints, FAVORITES);
|
||||
if (showFavorites) {
|
||||
findLocationPoints(route, FAVORITES, array, app.getFavorites().getFavouritePoints(),
|
||||
findLocationPoints(route, FAVORITES, array, app.getFavorites().getVisibleFavouritePoints(),
|
||||
announceFavorites);
|
||||
sortList(array);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue