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 waitForRender + mergeOptions not working when view controller is in transit #6702

Merged
merged 5 commits into from
Oct 25, 2020

Conversation

danilobuerger
Copy link
Collaborator

When waitForRender is set to true, calling Navigation.mergeOptions early (for example in componentDidMount) will lead to the options not being applied as the backing view controller has not yet been placed in the window hierarchy. This PR aims to keep track of any pending view controllers and opens them up to being found via their component id. Thus enabling Navigation.mergeOptions to work on view controllers in transit.

The pending view controllers are now being kept in RNNLayoutManager. For that reason, the layout manager was converted to be instantiable.

A NSHashTable was chosen as the backing storage to support keeping the view controllers as a weak reference.

Fixes #6085

@danilobuerger
Copy link
Collaborator Author

@yogevbd this finally passes CI

@yogevbd yogevbd merged commit 4b48ab0 into wix:master Oct 25, 2020
@guyca guyca deleted the pendinglayouts branch October 30, 2020 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TopBar buttons not rendered when waitForRender is set to true on iOS
2 participants