Fix modifying markers list
This commit is contained in:
parent
a44518009e
commit
a19ffdb884
1 changed files with 2 additions and 2 deletions
|
@ -282,7 +282,7 @@ public class MapMarkersHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeFromMapMarkersList(MapMarker marker) {
|
private void removeFromMapMarkersList(MapMarker marker) {
|
||||||
List<MapMarker> copyList = new ArrayList<>();
|
List<MapMarker> copyList = new ArrayList<>(mapMarkers);
|
||||||
copyList.remove(marker);
|
copyList.remove(marker);
|
||||||
mapMarkers = copyList;
|
mapMarkers = copyList;
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,7 @@ public class MapMarkersHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addToMapMarkersList(int position, List<MapMarker> markers) {
|
private void addToMapMarkersList(int position, List<MapMarker> markers) {
|
||||||
List<MapMarker> copyList = new ArrayList<>();
|
List<MapMarker> copyList = new ArrayList<>(mapMarkers);
|
||||||
copyList.addAll(position, markers);
|
copyList.addAll(position, markers);
|
||||||
mapMarkers = copyList;
|
mapMarkers = copyList;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue