Conversation
|
@Chaoba please add a test for this scenario |
|
@kiryldz Add a test case for this scenario. We can't verify the sync set data in this test case, however, we have other cases to verify sync set data, so IMO we can skip this part. |
| ) : this(builder) { | ||
| rawGeoJson?.let { | ||
| ignoreParsedGeoJsonRegistry[sourceId] = false | ||
| val dataKey = sourceId + it.hashCode() |
There was a problem hiding this comment.
why can't it be simply hash code?
There was a problem hiding this comment.
If set the same data to two different sources, they will affect each other.
| fun data(value: String) = apply { | ||
| ignoreParsedGeoJsonRegistry[sourceId] = true | ||
| // Clear all asynchronous data | ||
| updateParsedGeoJsonRegistry.clear() |
There was a problem hiding this comment.
shouldn't actually it be the whole fix?
why do we need a set instead of the hash map?
There was a problem hiding this comment.
The set contains those data that need to be updated to source, no need additional true or false values for them. In other words, those data that are not in the set will not be updated to the source
|
not relevant as #699 landed. |
PRs must be submitted under the terms of our Contributor License Agreement CLA.
Fixes: #381
Pull request checklist:
mapbox-maps-androidchangelog:<changelog>Change the logic of handling geojson update</changelog>.Summary of changes
Introduced a HashSet to record the data that need to update for each GeojsonSource to avoid the issue that aync data update reset
ignoreParsedGeoJsonRegistrytag.User impact (optional)