mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrate ReactTextInputManager to be bridgeless
Summary: Migrate ReactTextinputManager to support bridgeless mode by accessing the EventDispatcher through the UIManagerHelper instead of from ReactContext. Reviewed By: mdvacca Differential Revision: D19614184 fbshipit-source-id: 5dd4945223d10785f8fe171e06d6f7ef42f9d834
This commit is contained in:
committed by
Facebook Github Bot
parent
1c83e5a917
commit
b592c863ef
@@ -17,6 +17,7 @@ import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.CatalystInstance;
|
||||
import com.facebook.react.bridge.JSIModuleType;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReactNoCrashSoftException;
|
||||
import com.facebook.react.bridge.ReactSoftException;
|
||||
import com.facebook.react.bridge.UIManager;
|
||||
import com.facebook.react.uimanager.common.UIManagerType;
|
||||
@@ -48,7 +49,7 @@ public class UIManagerHelper {
|
||||
if (!context.hasCatalystInstance()) {
|
||||
ReactSoftException.logSoftException(
|
||||
"UIManagerHelper",
|
||||
new IllegalStateException(
|
||||
new ReactNoCrashSoftException(
|
||||
"Cannot get UIManager because the context doesn't contain a CatalystInstance."));
|
||||
return null;
|
||||
}
|
||||
@@ -57,7 +58,7 @@ public class UIManagerHelper {
|
||||
if (!context.hasActiveCatalystInstance()) {
|
||||
ReactSoftException.logSoftException(
|
||||
"UIManagerHelper",
|
||||
new IllegalStateException(
|
||||
new ReactNoCrashSoftException(
|
||||
"Cannot get UIManager because the context doesn't contain an active CatalystInstance."));
|
||||
if (returnNullIfCatalystIsInactive) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user