Skip to content

Fix: use setXXX() callback instead of setting callback to properties directly - #56

Merged
wf9a5m75 merged 4 commits into
mainfrom
controller_callback
Aug 15, 2025
Merged

Fix: use setXXX() callback instead of setting callback to properties directly#56
wf9a5m75 merged 4 commits into
mainfrom
controller_callback

Conversation

@wf9a5m75

Copy link
Copy Markdown
Contributor

Before

val controller =
MapboxMapViewController(
holder = holder,
)
(state as? MapboxMapViewState)?.let { mapViewState ->
mapViewState.controller = controller
controller.cameraMoveListener = mapViewState::OnCameraChange
}
controller.mapClickListener = onMapClick
controller.markerClickListener = onMarkerClick
controller.markerDragStartListener = onMarkerDragStart
controller.markerDragListener = onMarkerDrag
controller.markerDragEndListener = onMarkerDragEnd
controller.circleClickListener = onCircleClick
controller.polylineClickListener = onPolylineClick
controller.setOnMarkerAnimationStart(onMarkerAnimateStart)
controller.setOnMarkerAnimationEnd(onMarkerAnimateEnd)

After

val controller =
    MapboxMapViewController(
        holder = holder,
    )
(state as? MapboxMapViewState)?.let { mapViewState ->
    mapViewState.controller = controller
    controller.setCameraMoveListener(mapViewState::OnCameraChange)
}
controller.setMapClickListener(onMapClick)
controller.setMarkerClickListener(onMarkerClick)
controller.setMarkerDragStartListener(onMarkerDragStart)
controller.setMarkerDragListener(onMarkerDrag)
controller.setMarkerDragEndListener(onMarkerDragEnd)
controller.setCircleClickListener(onCircleClick)
controller.setPolylineClickListener(onPolylineClick)
controller.setOnMarkerAnimationStart(onMarkerAnimateStart)
controller.setOnMarkerAnimationEnd(onMarkerAnimateEnd)
controller.setOnMarkerAnimationStart(onMarkerAnimateStart)
controller.setOnMarkerAnimationEnd(onMarkerAnimateEnd)

@wf9a5m75
wf9a5m75 merged commit 92f2162 into main Aug 15, 2025
1 check failed
@wf9a5m75
wf9a5m75 deleted the controller_callback branch August 15, 2025 16:18
wf9a5m75 pushed a commit that referenced this pull request Aug 16, 2025
wf9a5m75 pushed a commit that referenced this pull request Aug 16, 2025
…k to properties directly (#56)""

This reverts commit 22018ec.
wf9a5m75 added a commit that referenced this pull request Nov 28, 2025
…directly (#56)

* Fix: use setXXX() callback instead of setting callback to properties directly

* Fix: KtLint errors

* Fix: Android Lint errors

* Fix: KtLint errors
wf9a5m75 pushed a commit that referenced this pull request Nov 28, 2025
wf9a5m75 pushed a commit that referenced this pull request Nov 28, 2025
…k to properties directly (#56)""

This reverts commit 22018ec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant