mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove TMMDelegate's dependency on ReactApplicationContext
Summary: `TurboModuleManagerDelegate` is an interface used to query/create TurboModules. It doesn't need to know anything about `ReactApplicationContext`. So, I'm removing all references of `ReactApplicationContext` from this class. Reviewed By: mdvacca Differential Revision: D15590552 fbshipit-source-id: 761d3ed71f124955f9c6b997e68a7a8338182126
This commit is contained in:
committed by
Facebook Github Bot
parent
fd7f5bb768
commit
dbad0fd607
+1
-1
@@ -20,7 +20,7 @@ public abstract class ReactPackageTurboModuleManagerDelegate extends TurboModule
|
||||
private final ReactApplicationContext mReactApplicationContext;
|
||||
|
||||
public ReactPackageTurboModuleManagerDelegate(ReactApplicationContext reactApplicationContext, List<ReactPackage> packages) {
|
||||
super(reactApplicationContext);
|
||||
super();
|
||||
mReactApplicationContext = reactApplicationContext;
|
||||
for (ReactPackage reactPackage : packages) {
|
||||
if (reactPackage instanceof TurboReactPackage) {
|
||||
|
||||
+1
-7
@@ -20,17 +20,11 @@ public abstract class TurboModuleManagerDelegate {
|
||||
}
|
||||
|
||||
private final HybridData mHybridData;
|
||||
private final ReactApplicationContext mReactApplicationContext;
|
||||
|
||||
protected abstract HybridData initHybrid();
|
||||
|
||||
protected TurboModuleManagerDelegate(ReactApplicationContext rac) {
|
||||
protected TurboModuleManagerDelegate() {
|
||||
mHybridData = initHybrid();
|
||||
mReactApplicationContext = rac;
|
||||
}
|
||||
|
||||
protected ReactApplicationContext getReactApplicationContext() {
|
||||
return mReactApplicationContext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user