android-maps-compose icon indicating copy to clipboard operation
android-maps-compose copied to clipboard

fix: update set() to update() for a ComposeNode (map objects)

Open el-qq opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. For map objects (e.g., Circle()), parameters are created both in factory and in the update block


    ComposeNode<CircleNode, MapApplier>(
        factory = {
            val circle = mapApplier?.map?.addCircle {
                center(center)
                 //...
            } ?: error("Error adding circle")
            circle.tag = tag
            CircleNode(circle, onClick)
        },
        update = {
            update(onClick) { this.onCircleClick = it }

            set(center) { this.circle.center = it }

In addition, update() is recommended. From the description: For example, use [update} when value is passed into the class constructor parameters.

Describe the solution you'd like


//....
        update = {
            update(onClick) { this.onCircleClick = it }

            update(center) { this.circle.center = it }

el-qq avatar Apr 10 '24 17:04 el-qq

I'd call this a bug, not a feature request. Affected code uses the wrong operator, causing slower performance on initial composition.

bubenheimer avatar Apr 10 '24 17:04 bubenheimer

:tada: This issue has been resolved in version 4.4.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

googlemaps-bot avatar May 07 '24 17:05 googlemaps-bot

:tada: This issue has been resolved in version 5.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

googlemaps-bot avatar May 07 '24 18:05 googlemaps-bot