Skip to content
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

Fix scaleBarEnabled on new arch #3554

Merged
merged 1 commit into from
Jun 29, 2024

Conversation

janicduplessis
Copy link
Contributor

Description

This fixes scaleBarEnabled={false} on new arch. RNMBXConvertFollyDynamicToId converts to NSBoolean * so when assigning to a Bool prop it is always true. To fix it I used the RNMBX_OPTIONAL_PROP_BOOL macro which handles deferencing the pointer properly.

Tested in an app using new arch, before the change the scale bar is always visible even when setting scaleBarEnabled={false}. After the scale bar is properly hidden.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

Component to reproduce the issue you're fixing

@mfazekas
Copy link
Contributor

@janicduplessis that's great, thanks much!

@mfazekas mfazekas merged commit 55216db into rnmapbox:main Jun 29, 2024
11 checks passed
@janicduplessis janicduplessis deleted the @janic/fix-scale-bar branch June 29, 2024 15:07
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.

2 participants