mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Expose resolveCustomDirectEventName from UIManager interface
Summary: Expose `resolveCustomDirectEventName` from UIManager interface for Bridgeless Mode+NativeAnimatedModule. We cannot remove the interface from the Non-Fabric UIManagerModule yet, as it would break downstream open-source dependencies, so I just marked it deprecated. Note that this still doesn't totally fix issues with Bridgeless mode: generally I have to navigate to a Bridgeless surface, exit it, and then navigate back, and only on the 2nd navigation does everything seem to work properly... Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D22483508 fbshipit-source-id: 685126e7e51aa5d0fd60ad5d4ecc44e8c6c3029d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
95d05fc415
commit
80f13412e5
@@ -357,20 +357,30 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
}
|
||||
|
||||
/** Resolves Direct Event name exposed to JS from the one known to the Native side. */
|
||||
@Deprecated
|
||||
public CustomEventNamesResolver getDirectEventNamesResolver() {
|
||||
return new CustomEventNamesResolver() {
|
||||
@Override
|
||||
public @Nullable String resolveCustomEventName(String eventName) {
|
||||
Map<String, String> customEventType =
|
||||
(Map<String, String>) mCustomDirectEvents.get(eventName);
|
||||
if (customEventType != null) {
|
||||
return customEventType.get("registrationName");
|
||||
}
|
||||
return eventName;
|
||||
public @Nullable String resolveCustomEventName(@Nullable String eventName) {
|
||||
return resolveCustomDirectEventName(eventName);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
@Nullable
|
||||
public String resolveCustomDirectEventName(@Nullable String eventName) {
|
||||
if (eventName != null) {
|
||||
Map<String, String> customEventType =
|
||||
(Map<String, String>) mCustomDirectEvents.get(eventName);
|
||||
if (customEventType != null) {
|
||||
return customEventType.get("registrationName");
|
||||
}
|
||||
}
|
||||
return eventName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void profileNextBatch() {
|
||||
mUIImplementation.profileNextBatch();
|
||||
|
||||
Reference in New Issue
Block a user