Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
edit: this won't be needed after facebook/react-native#47086
As it is, the project won't build with new architecture on RN 0.76 because the
ViewManagerDelegate
interface has been refactored to Kotlin and thecommandId
is now a non-nullable String.This PR changes the
override fun receiveCommand
signature to use non-nullableString
too.This is backward-compatible because the overridden function is defined in a Java base class and
are both valid overrides of Java in Kotlin.
The fix (and the assumption)
Changing to a non-nullable
String
complies with theViewManagerDelegate.kt
interface and should also be future-compatible because if at some point the base class is also Kotlinified this will still work - assuming that the current Java signaturepublic void receiveCommand(@NonNull T root, String commandId, @Nullable ReadableArray args)
becomesopen ... fun receiveCommand(root: NestedScrollableHost, commandId: String, args: ReadableArray?)
(i.e. the string won't be nullable, in line with how it's defined inViewManagerDelegate.kt
).Test Plan
TODO
What's required for testing (prerequisites)?
What are the steps to reproduce (after prerequisites)?
Compatibility
Checklist
README.md