MapDataManager: don't update whole list if no point was added (after onResume)

This commit is contained in:
cyBerta
2019-04-16 08:39:54 +02:00
parent 7c9d2df76a
commit 1de13e0834
@@ -285,7 +285,12 @@ public class MapDataManager implements DcEventCenter.DcEventDelegate, GenerateIn
contactMapMetadata = addContactMapSource(contactId);
}
LinkedList<Feature> sortedPointFeatures = new LinkedList<>();
LinkedList<Feature> sortedPointFeatures = featureCollections.get(contactMapMetadata.getMarkerFeatureCollection());
if (sortedPointFeatures != null && sortedPointFeatures.size() == count) {
return;
} else {
sortedPointFeatures = new LinkedList<>();
}
LinkedList<Feature> sortedLineFeatures = new LinkedList<>();
for (int i = count - 1; i >= 0; i--) {