File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -938,8 +938,15 @@ - (BOOL)isTransparentModal
938938
939939- (void )invalidateImpl
940940{
941- _controller = nil ;
942- [_sheetsScrollView removeObserver: self forKeyPath: @" bounds" context: nil ];
941+ // We want to run after container updates are performed (transitions etc.)
942+ __weak auto weakSelf = self;
943+ dispatch_async (dispatch_get_main_queue (), ^{
944+ auto strongSelf = weakSelf;
945+ if (strongSelf) {
946+ strongSelf->_controller = nil ;
947+ [strongSelf->_sheetsScrollView removeObserver: self forKeyPath: @" bounds" context: nil ];
948+ }
949+ });
943950}
944951
945952#ifndef RCT_NEW_ARCH_ENABLED
Original file line number Diff line number Diff line change @@ -1426,7 +1426,7 @@ - (void)mountingTransactionDidMount:(const facebook::react::MountingTransaction
14261426#ifdef RCT_NEW_ARCH_ENABLED
14271427 [screenRef invalidateImpl ];
14281428#else
1429- [screenRef invalidate ];
1429+ [screenRef invalidate ];
14301430#endif
14311431 }
14321432 strongSelf->_toBeDeletedScreens .clear ();
You can’t perform that action at this time.
0 commit comments