From 2f9317db84e6bf5f39e4b4e340d65809a0b627c5 Mon Sep 17 00:00:00 2001 From: Grzegorz Orczykowski Date: Mon, 13 Jan 2025 21:10:51 +0100 Subject: [PATCH] Fixed removing polyline points in Mapbox --- .../java/org/odk/collect/mapbox/DynamicPolyLineFeature.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapbox/src/main/java/org/odk/collect/mapbox/DynamicPolyLineFeature.kt b/mapbox/src/main/java/org/odk/collect/mapbox/DynamicPolyLineFeature.kt index cef92b955ee..987c2e03c81 100644 --- a/mapbox/src/main/java/org/odk/collect/mapbox/DynamicPolyLineFeature.kt +++ b/mapbox/src/main/java/org/odk/collect/mapbox/DynamicPolyLineFeature.kt @@ -93,8 +93,8 @@ internal class DynamicPolyLineFeature( fun removeLastPoint() { if (pointAnnotations.isNotEmpty()) { pointAnnotationManager.delete(pointAnnotations.last()) - pointAnnotations.removeLast() - points.removeLast() + pointAnnotations.removeAt(pointAnnotations.lastIndex) + points.removeAt(points.lastIndex) updateLine() } }