This repository was archived by the owner on Feb 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1143,15 +1143,7 @@ - (void)_completePendingLayoutTransition
11431143 [self setCalculatedDisplayNodeLayout: _pendingLayoutTransition.pendingLayout];
11441144 [self _completeLayoutTransition: _pendingLayoutTransition];
11451145 }
1146-
1147- // Trampoline to the main thread if necessary
1148- if (_pendingLayoutTransition && _pendingLayoutTransition.isSynchronous == NO ) {
1149- [self _pendingLayoutTransitionDidComplete ];
1150- } else {
1151- ASPerformBlockOnMainThread (^{
1152- [self _pendingLayoutTransitionDidComplete ];
1153- });
1154- }
1146+ [self _pendingLayoutTransitionDidComplete ];
11551147}
11561148
11571149/*
@@ -1166,7 +1158,7 @@ - (void)_completeLayoutTransition:(ASLayoutTransition *)layoutTransition
11661158 }
11671159
11681160 // Trampoline to the main thread if necessary
1169- if (layoutTransition.isSynchronous == NO ) {
1161+ if (ASDisplayNodeThreadIsMain () || layoutTransition.isSynchronous == NO ) {
11701162 [layoutTransition commitTransition ];
11711163 } else {
11721164 // Subnode insertions and removals need to happen always on the main thread if at least one subnode is already loaded
@@ -1194,7 +1186,7 @@ - (void)_pendingLayoutTransitionDidComplete
11941186 if (CGSizeEqualToSize (layoutSize, CGSizeZero)) {
11951187 return ;
11961188 }
1197-
1189+
11981190 if (!_placeholderImage) {
11991191 _placeholderImage = [self placeholderImage ];
12001192 }
You can’t perform that action at this time.
0 commit comments