-
Notifications
You must be signed in to change notification settings - Fork 38
Fixes two issues with the BrazeBannerView #113
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
base: master
Are you sure you want to change the base?
Conversation
mrice-wisecode
commented
Aug 20, 2025
- Fixes calling set state when not mounted. (exception) (Issue Link)
- Fixes PlatformView being rendered before a size is available. (exception) (Issue Link)
1. Fixes calling set state when not mounted. (exception) 2. Fixes PlatformView being rendered before a size is available. (exception)
|
Hey @mrice-wisecode thanks for opening this pull request and for your continued and active engagement on these two issues. Our SDK code changes go through an internal review process, but this PR will be a really helpful reference for our team. We'll keep you posted in this PR and on the original issues when the changes have been made and released. |
| }); | ||
| calculatedHeight = height; | ||
| if(mounted) { | ||
| setState(() {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For our knowledge, could you give some context on why you moved the calculatedHeight explicitly out of the setState block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah for sure. so in the case where calculatedHeight gets set before we are mounted it would be set so that upon the initial call to the build function the calculatedHeight would be set and ready for use. then in subsequent calls we could likely assume we would then be mounted and setState would get called. the function inside of setState is not at all necessary to use and just for convenience. this guarantees calculatedHeight will get set and if we need to update our state because we are mounted it would still happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyhow, take it or leave it but this does resolve the two issues I recently posted. For now i'll deploy our updates on my fork and hope to see some fixes soon. Thanks for keeping this updated! Much appreciated
|
Hi @mrice-wisecode, Thank you for submitting this PR! As noted in the original Github issues, we have released fixes to the root causes you raised and addressed in this PR. I will close this out and feel free to validate the behaviors on our latest 16.0.0 SDK version. Thanks! |
|
Apologies, I will reopen this PR since it addresses another issue that is not yet fixed |