Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
pengdev committed Nov 3, 2022
1 parent ee73447 commit 7efd80b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Mapbox welcomes participation and contributions from everyone.

# main
## Features ✨ and improvements 🏁
* Add `Widget.triggerRepaint` protected API and updated the `BitmapWidget` to trigger repaint after widget is updated.
* Add `Widget.triggerRepaint` protected API and updated the `BitmapWidget` to trigger repaint after widget is updated. ([1797](https://github.com/mapbox/mapbox-maps-android/pull/1797))

# 10.10.0-beta.1 November 03, 2022
## Features ✨ and improvements 🏁
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/mapbox/maps/MapController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ internal class MapController : MapPluginProviderDelegate, MapControllable {

override fun removeWidget(widget: Widget): Boolean {
val wasRemoved = renderer.renderThread.removeWidget(widget)
widget.setRepaintTrigger(null)
if (wasRemoved) {
widget.setRepaintTrigger(null)
renderer.scheduleRepaint()
}
return wasRemoved
Expand Down
4 changes: 2 additions & 2 deletions sdk/src/main/java/com/mapbox/maps/renderer/widget/Widget.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ abstract class Widget internal constructor() {
abstract fun getRotation(): Float

@JvmSynthetic
internal fun setRepaintTrigger(trigger: (() -> Unit)?) {
repaintTrigger = trigger
internal fun setRepaintTrigger(doOnRepaint: (() -> Unit)?) {
repaintTrigger = doOnRepaint
}
}

0 comments on commit 7efd80b

Please sign in to comment.