mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add receiveCommand to the Java Delegate
Summary: Adding support for receiving commands and calling methods defined on the interface in https://github.com/facebook/react-native/commit/c7ee38149d02b64bae6aadcc72c4f664900ff0cb Reviewed By: JoshuaGross Differential Revision: D16434402 fbshipit-source-id: a539050a1a2b2a67f9ba7145ed789de700461589
This commit is contained in:
committed by
Facebook Github Bot
parent
4ab9da134c
commit
4eca2e226c
+2
-4
@@ -124,11 +124,9 @@ function generateCommandsString(
|
||||
) {
|
||||
return component.commands
|
||||
.map(command => {
|
||||
const safeJavaName = toSafeJavaString(command.name);
|
||||
const lowerJavaName =
|
||||
safeJavaName[0].toLowerCase() + safeJavaName.slice(1);
|
||||
const safeJavaName = toSafeJavaString(command.name, false);
|
||||
|
||||
return `void ${lowerJavaName}(${getCommandArguments(
|
||||
return `void ${safeJavaName}(${getCommandArguments(
|
||||
command,
|
||||
componentName,
|
||||
)});`;
|
||||
|
||||
Reference in New Issue
Block a user