Fix small bug

This commit is contained in:
Alexander Sytnyk 2018-03-17 15:39:52 +02:00
parent c582434499
commit cdcab890e7

View file

@ -614,13 +614,14 @@ public class MapMarkersHelper {
private void removeActiveMarkersFromSyncGroup(String syncGroupId) {
if (syncGroupId != null) {
markersDbHelper.removeActiveMarkersFromSyncGroup(syncGroupId);
List<MapMarker> newList = new ArrayList<>();
List<MapMarker> copyList = new ArrayList<>(mapMarkers);
for (MapMarker marker : copyList) {
if (marker.groupKey == null || !marker.groupKey.equals(syncGroupId)) {
copyList.add(marker);
newList.add(marker);
}
}
mapMarkers = copyList;
mapMarkers = newList;
reorderActiveMarkersIfNeeded();
refresh();
}