-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GestureDetector doesn't update correctly #535
Comments
I guess code should look like below. But I think this should be handled by @Composable
private fun AR(selectedOption: String?) {
val currentOption by rememberUpdatedState(selectedOption)
ARScene(
onGestureListener = rememberOnGestureListener(
onSingleTapConfirmed = { event, node ->
Log.d("AR", "Single tap confirmed (option: $currentOption)")
}
)
)
} |
Hi, Yes, you're right, a lambda shouldn't be remembered. Thanks |
Can't make any promises, sorry. I'm not invested in your library yet. I'm still exploring my options for AR implementation. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Problem
When
rememberOnGestureListener
is recomposed, listeners are not updated.Example
Please see example below.
After "option" is selected by using bottom sheet (e.g. "First"), you would expect that
"Single tap confirmed (option: First)"
is printed to console. Instead"Single tap confirmed (option: null)"
is shown.The text was updated successfully, but these errors were encountered: