Fix small bug
This commit is contained in:
parent
c582434499
commit
cdcab890e7
1 changed files with 3 additions and 2 deletions
|
@ -614,13 +614,14 @@ public class MapMarkersHelper {
|
||||||
private void removeActiveMarkersFromSyncGroup(String syncGroupId) {
|
private void removeActiveMarkersFromSyncGroup(String syncGroupId) {
|
||||||
if (syncGroupId != null) {
|
if (syncGroupId != null) {
|
||||||
markersDbHelper.removeActiveMarkersFromSyncGroup(syncGroupId);
|
markersDbHelper.removeActiveMarkersFromSyncGroup(syncGroupId);
|
||||||
|
List<MapMarker> newList = new ArrayList<>();
|
||||||
List<MapMarker> copyList = new ArrayList<>(mapMarkers);
|
List<MapMarker> copyList = new ArrayList<>(mapMarkers);
|
||||||
for (MapMarker marker : copyList) {
|
for (MapMarker marker : copyList) {
|
||||||
if (marker.groupKey == null || !marker.groupKey.equals(syncGroupId)) {
|
if (marker.groupKey == null || !marker.groupKey.equals(syncGroupId)) {
|
||||||
copyList.add(marker);
|
newList.add(marker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mapMarkers = copyList;
|
mapMarkers = newList;
|
||||||
reorderActiveMarkersIfNeeded();
|
reorderActiveMarkersIfNeeded();
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue