-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Start surface after setting the delegate #33402
Conversation
When starting the surface, _propagateStageChange is called. This checks the delegate to call surface:didChangeStage: on it. When initWithSurface:sizeMeasureMode: is called after start, then the delegate will be nil and thus not be called. This turns it around so a delegate is present for the surface to propagate its state to. This fixes RCTContentDidAppearNotification not getting posted otherwise.
Base commit: 5386364 |
Base commit: 5386364 |
@ShikaSD has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@ShikaSD per your request I investigated the calls to Before the patch, on start: called with
After the patch, on start: called with
|
This pull request was successfully merged by @danilobuerger in 75105e6. When will my fix make it into a release? | Upcoming Releases |
Summary: When starting the surface, _propagateStageChange is called. This checks the delegate to call surface:didChangeStage: on it. When initWithSurface:sizeMeasureMode: is called after start, then the delegate will be nil and thus not be called. This turns it around so a delegate is present for the surface to propagate its state to. This fixes RCTContentDidAppearNotification not getting posted otherwise. ## Changelog [iOS] [Fixed] - Post RCTContentDidAppearNotification with new arch Pull Request resolved: facebook#33402 Test Plan: I found it best to set a breakpoint in XCode to where RCTContentDidAppearNotification is being posted. Prior to the patch that breakpoint will not be called. After applying the patch, it will be called. Reviewed By: philIip Differential Revision: D34753329 Pulled By: ShikaSD fbshipit-source-id: cc44a4c3a787d49e22e9d0c3a82c0f11ed281a0a
Summary: When starting the surface, _propagateStageChange is called. This checks the delegate to call surface:didChangeStage: on it. When initWithSurface:sizeMeasureMode: is called after start, then the delegate will be nil and thus not be called. This turns it around so a delegate is present for the surface to propagate its state to. This fixes RCTContentDidAppearNotification not getting posted otherwise. ## Changelog [iOS] [Fixed] - Post RCTContentDidAppearNotification with new arch Pull Request resolved: #33402 Test Plan: I found it best to set a breakpoint in XCode to where RCTContentDidAppearNotification is being posted. Prior to the patch that breakpoint will not be called. After applying the patch, it will be called. Reviewed By: philIip Differential Revision: D34753329 Pulled By: ShikaSD fbshipit-source-id: cc44a4c3a787d49e22e9d0c3a82c0f11ed281a0a
Summary: When starting the surface, _propagateStageChange is called. This checks the delegate to call surface:didChangeStage: on it. When initWithSurface:sizeMeasureMode: is called after start, then the delegate will be nil and thus not be called. This turns it around so a delegate is present for the surface to propagate its state to. This fixes RCTContentDidAppearNotification not getting posted otherwise. [iOS] [Fixed] - Post RCTContentDidAppearNotification with new arch Pull Request resolved: facebook#33402 Test Plan: I found it best to set a breakpoint in XCode to where RCTContentDidAppearNotification is being posted. Prior to the patch that breakpoint will not be called. After applying the patch, it will be called. Reviewed By: philIip Differential Revision: D34753329 Pulled By: ShikaSD fbshipit-source-id: cc44a4c3a787d49e22e9d0c3a82c0f11ed281a0a
Summary
When starting the surface, _propagateStageChange is called. This checks the delegate to call surface:didChangeStage: on it.
When initWithSurface:sizeMeasureMode: is called after start, then the delegate will be nil and thus not be called.
This turns it around so a delegate is present for the surface to propagate its state to.
This fixes RCTContentDidAppearNotification not getting posted otherwise.
Changelog
[iOS] [Fixed] - Post RCTContentDidAppearNotification with new arch
Test Plan
I found it best to set a breakpoint in XCode to where RCTContentDidAppearNotification is being posted.
Prior to the patch that breakpoint will not be called. After applying the patch, it will be called.