mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Undo a breaking change on ReactViewGroup constructor (#47423)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47423 cipolleschi found out that we broke the `ReactViewGroup` constructor when making this class Nullsafe. Specifically now users would need to pass a `Context` and not a `Context?` as libraries will break (and this will break a lot of them). So I'm undoing this change by annotating this parameter as Nullable. Changelog: [Android] [Changed] - Undo a breaking change on ReactViewGroup constructor Reviewed By: tdn120 Differential Revision: D65483379 fbshipit-source-id: 43f7bcab5f10b1b8b5601de1dab314d7bbb1eefe
This commit is contained in:
1 parent
72bd840dd3
commit
bbe714e487
1 file changed
+7
-1
+7
-1
@@ -143,7 +143,13 @@ public class ReactViewGroup extends ViewGroup
|
||||
private float mBackfaceOpacity;
|
||||
private String mBackfaceVisibility;
|
||||
|
||||
public ReactViewGroup(Context context) {
|
||||
/**
|
||||
* Creates a new `ReactViewGroup` instance.
|
||||
*
|
||||
* @param context A {@link Context} instance. It's Nullable to not break compatibility with OSS
|
||||
* users (could be made non-null in the future but requires proper comms).
|
||||
*/
|
||||
public ReactViewGroup(@Nullable Context context) {
|
||||
super(context);
|
||||
initView();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user