Skip to content

Commit

Permalink
Undo a breaking change on ReactViewGroup constructor
Browse files Browse the repository at this point in the history
Summary:
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

Differential Revision: D65483379
  • Loading branch information
cortinico authored and facebook-github-bot committed Nov 5, 2024
1 parent 8c50bf0 commit b14247e
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 don't 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 b14247e

Please sign in to comment.