Skip to content

fix: rename InvalidatingComposeView getRotation param to avoid View shadowing - #952

Open
kikoso wants to merge 1 commit into
mainfrom
fix/invalidating-compose-view-rotation-shadowing
Open

fix: rename InvalidatingComposeView getRotation param to avoid View shadowing#952
kikoso wants to merge 1 commit into
mainfrom
fix/invalidating-compose-view-rotation-shadowing

Conversation

@kikoso

@kikoso kikoso commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • InvalidatingComposeView extends AbstractComposeViewView, which already declares getRotation(): Float. The constructor property getRotation: () -> Float was silently shadowed by the inherited View method, so calling getRotation() in Content() resolved to View.getRotation() instead of invoking the injected lambda.
  • As a result, the rotation key used in the LaunchedEffect that triggers invalidation never reflected the actual cluster/item rotation state.
  • Renamed the parameter to getRotationOverride to remove the ambiguity, matching how getAnchor/getZIndex are already named without collision.

Fixes #951

Test plan

  • ./gradlew :maps-compose-utils:compileDebugKotlin passes

…hadowing

InvalidatingComposeView extends View, which already declares
getRotation(): Float. The constructor property of the same name was
silently shadowed by the inherited View method, so calling
getRotation() inside Content() never invoked the injected lambda and
the rotation LaunchedEffect key never reflected cluster/item rotation
state changes.
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 25.82%

There is no coverage information present for the Files changed

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.

getRotation parameter of InvalidatingComposeView is unused

3 participants