mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Unify measure functions in Fabric Android
Summary: Until now, there were two measure functions that differ in only one parameter (rootTag). The rootTag is used to use the context associated to the tag as part of the calculation of layout, otherwise it just uses the ReactApplicationContext. This diff unifies both method into an unique method that changelog: [internal] Reviewed By: JoshuaGross Differential Revision: D20081281 fbshipit-source-id: b1f6a6cedbf78f36f36fd0f93407c23c6996d76b
This commit is contained in:
committed by
Facebook Github Bot
parent
ed5f9eeb2a
commit
6aea6256a6
@@ -429,31 +429,10 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
float maxWidth,
|
||||
float minHeight,
|
||||
float maxHeight) {
|
||||
ReactContext context =
|
||||
rootTag < 0 ? mReactApplicationContext : mReactContextForRootTag.get(rootTag);
|
||||
return mMountingManager.measure(
|
||||
mReactContextForRootTag.get(rootTag),
|
||||
componentName,
|
||||
localData,
|
||||
props,
|
||||
state,
|
||||
getYogaSize(minWidth, maxWidth),
|
||||
getYogaMeasureMode(minWidth, maxWidth),
|
||||
getYogaSize(minHeight, maxHeight),
|
||||
getYogaMeasureMode(minHeight, maxHeight));
|
||||
}
|
||||
|
||||
@DoNotStrip
|
||||
@SuppressWarnings("unused")
|
||||
private long measure(
|
||||
String componentName,
|
||||
@NonNull ReadableMap localData,
|
||||
@NonNull ReadableMap props,
|
||||
@NonNull ReadableMap state,
|
||||
float minWidth,
|
||||
float maxWidth,
|
||||
float minHeight,
|
||||
float maxHeight) {
|
||||
return mMountingManager.measure(
|
||||
mReactApplicationContext,
|
||||
context,
|
||||
componentName,
|
||||
localData,
|
||||
props,
|
||||
|
||||
Reference in New Issue
Block a user