-
-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replay edits done during quests download (#5473)
MapDataWithEditsSource: call onUpdated to listeners again after the call onReplacedForBBox to listeners completed for updates that happened while the latter was being executed (fixes #4258)
- Loading branch information
1 parent
dedc68c
commit e2621c7
Showing
5 changed files
with
140 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...rc/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataWithGeometryUpdates.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.westnordost.streetcomplete.data.osm.mapdata | ||
|
||
data class MapDataWithGeometryUpdates( | ||
val updated: MutableMapDataWithGeometry = MutableMapDataWithGeometry(), | ||
val deleted: MutableList<ElementKey> = ArrayList() | ||
) { | ||
fun add(updated: MapDataWithGeometry, deleted: Collection<ElementKey>) { | ||
this.deleted.removeAll(updated.map { it.key }) | ||
this.deleted.addAll(deleted) | ||
|
||
this.updated.removeAll(deleted) | ||
this.updated.putAll(updated) | ||
} | ||
|
||
fun clear() { | ||
updated.clear() | ||
deleted.clear() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters