Move `RCTRootShadowView` creation to main thread

This commit is contained in:
Adam Gleitman 2022-08-09 11:52:42 -07:00
Родитель e960741886
Коммит 0890b47d2b
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -332,12 +332,13 @@ static NSDictionary *deviceOrientationEventBody(UIDeviceOrientation orientation)
_viewRegistry[reactTag] = rootView;
// Register shadow view
RCTRootShadowView *shadowView = [RCTRootShadowView new]; // TODO(macOS GH#774) - do this early to prevent RCTI18nUtil deadlock
RCTExecuteOnUIManagerQueue(^{
if (!self->_viewRegistry) {
return;
}
RCTRootShadowView *shadowView = [RCTRootShadowView new];
shadowView.availableSize = availableSize;
shadowView.reactTag = reactTag;
shadowView.viewName = NSStringFromClass([rootView class]);