mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Force setConstraints to run in the JS Thread
Summary: This diff forces the method: scheduler.constraintSurfaceLayout to run on the JS thread. Reviewed By: JoshuaGross Differential Revision: D15845768 fbshipit-source-id: de2aa69f301770aaf6cb7c3f5670548a3b6110df
This commit is contained in:
committed by
Facebook Github Bot
parent
5d18e9aa16
commit
f43039da87
@@ -418,12 +418,17 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
public void updateRootLayoutSpecs(
|
||||
final int rootTag, final int widthMeasureSpec, final int heightMeasureSpec) {
|
||||
|
||||
mBinding.setConstraints(
|
||||
rootTag,
|
||||
getMinSize(widthMeasureSpec),
|
||||
getMaxSize(widthMeasureSpec),
|
||||
getMinSize(heightMeasureSpec),
|
||||
getMaxSize(heightMeasureSpec));
|
||||
mReactApplicationContext.runOnJSQueueThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mBinding.setConstraints(
|
||||
rootTag,
|
||||
getMinSize(widthMeasureSpec),
|
||||
getMaxSize(widthMeasureSpec),
|
||||
getMinSize(heightMeasureSpec),
|
||||
getMaxSize(heightMeasureSpec));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void receiveEvent(int reactTag, String eventName, @Nullable WritableMap params) {
|
||||
|
||||
Reference in New Issue
Block a user