feat: add support for RN 73 (#2181)

PR bumping the library code to compile on new arch on RN 0.73.x and restoring the proper configuration of Image component on new arch on Android.

Also bumping the FabricExample to check if the code works correctly.
This commit is contained in:
Wojciech Lewicki
2023-12-01 11:58:49 +01:00
committed by GitHub
parent 20de90d272
commit 03ca039497
32 changed files with 2952 additions and 3096 deletions

View File

@@ -26,10 +26,10 @@ class RNSVGImageComponentDescriptor final
: ConcreteComponentDescriptor(parameters),
imageManager_(std::make_shared<ImageManager>(contextContainer_)){};
void adopt(ShadowNode::Unshared const &shadowNode) const override {
void adopt(ShadowNode &shadowNode) const override {
ConcreteComponentDescriptor::adopt(shadowNode);
auto &imageShadowNode = static_cast<RNSVGImageShadowNode &>(*shadowNode);
auto &imageShadowNode = static_cast<RNSVGImageShadowNode &>(shadowNode);
// `RNSVGImageShadowNode` uses `ImageManager` to initiate image loading and
// communicate the loading state and results to mounting layer.

View File

@@ -44,8 +44,8 @@ class JSI_EXPORT RNSVGImageShadowNode final : public ConcreteViewShadowNode<
void setImageManager(const SharedImageManager &imageManager);
static RNSVGImageState initialStateData(
ShadowNodeFragment const &fragment,
ShadowNodeFamilyFragment const &familyFragment,
Props::Shared const &props,
ShadowNodeFamily::Shared const &family,
ComponentDescriptor const &componentDescriptor) {
auto imageSource = ImageSource{ImageSource::Type::Invalid};
return {imageSource, {imageSource, nullptr, {}}};