mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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, {}}};
|
||||
|
||||
Reference in New Issue
Block a user