Skip to content

Commit

Permalink
Undo a breaking change on ReactViewGroup constructor (#47423)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
cortinico authored and facebook-github-bot committed Nov 5, 2024
1 parent 72bd840 commit bbe714e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ public void shutdown() {
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();
}
Expand Down

0 comments on commit bbe714e

Please # to comment.