Skip to content

Commit f900551

Browse files
Nick Lefeverfacebook-github-bot
authored andcommitted
Use RN_SERIALIZABLE_STATE for conditional getDiffProps code (#51516)
Summary: Pull Request resolved: #51516 See title Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D75153818 fbshipit-source-id: 66c9dee3bfdc56ebcffdceb7302cdb7efea70c75
1 parent 0c70c01 commit f900551

File tree

20 files changed

+22
-37
lines changed

20 files changed

+22
-37
lines changed

packages/react-native/ReactCommon/react/renderer/components/image/ImageProps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void ImageProps::setProp(
174174
}
175175
}
176176

177-
#ifdef ANDROID
177+
#ifdef RN_SERIALIZABLE_STATE
178178

179179
static folly::dynamic convertImageSource(const ImageSource& imageSource) {
180180
folly::dynamic imageSourceResult = folly::dynamic::object();

packages/react-native/ReactCommon/react/renderer/components/image/ImageProps.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ class ImageProps final : public ViewProps {
4646
Float fadeDuration{};
4747
bool progressiveRenderingEnabled{};
4848

49-
#ifdef ANDROID
50-
49+
#ifdef RN_SERIALIZABLE_STATE
5150
folly::dynamic getDiffProps(const Props* prevProps) const override;
52-
5351
#endif
5452
};
5553

packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ SharedDebugStringConvertibleList ScrollViewProps::getDebugProps() const {
592592
}
593593
#endif
594594

595-
#ifdef ANDROID
595+
#ifdef RN_SERIALIZABLE_STATE
596596

597597
static folly::dynamic convertScrollViewMaintainVisibleContentPosition(
598598
const ScrollViewMaintainVisibleContentPosition& value) {

packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ class ScrollViewProps final : public ViewProps {
8383
SharedDebugStringConvertibleList getDebugProps() const override;
8484
#endif
8585

86-
#ifdef ANDROID
87-
86+
#ifdef RN_SERIALIZABLE_STATE
8887
folly::dynamic getDiffProps(const Props* prevProps) const override;
89-
9088
#endif
9189
};
9290

packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ SharedDebugStringConvertibleList BaseTextProps::getDebugProps() const {
357357
}
358358
#endif
359359

360-
#ifdef ANDROID
360+
#ifdef RN_SERIALIZABLE_STATE
361361

362362
static folly::dynamic toDynamic(const Size& size) {
363363
folly::dynamic sizeResult = folly::dynamic::object();

packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ class BaseTextProps {
4242
SharedDebugStringConvertibleList getDebugProps() const;
4343
#endif
4444

45-
#ifdef ANDROID
46-
45+
#ifdef RN_SERIALIZABLE_STATE
4746
void appendTextAttributesProps(
4847
folly::dynamic& result,
4948
const BaseTextProps* prevProps) const;
50-
5149
#endif
5250
};
5351

packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ SharedDebugStringConvertibleList ParagraphProps::getDebugProps() const {
152152
}
153153
#endif
154154

155-
#ifdef ANDROID
155+
#ifdef RN_SERIALIZABLE_STATE
156156

157157
folly::dynamic ParagraphProps::getDiffProps(const Props* prevProps) const {
158158
static const auto defaultProps = ParagraphProps();

packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ class ParagraphProps : public ViewProps, public BaseTextProps {
5858
SharedDebugStringConvertibleList getDebugProps() const override;
5959
#endif
6060

61-
#ifdef ANDROID
62-
61+
#ifdef RN_SERIALIZABLE_STATE
6362
folly::dynamic getDiffProps(const Props* prevProps) const override;
64-
6563
#endif
6664
};
6765

packages/react-native/ReactCommon/react/renderer/components/text/RawTextProps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SharedDebugStringConvertibleList RawTextProps::getDebugProps() const {
2828
}
2929
#endif
3030

31-
#ifdef ANDROID
31+
#ifdef RN_SERIALIZABLE_STATE
3232

3333
folly::dynamic RawTextProps::getDiffProps(const Props* prevProps) const {
3434
folly::dynamic result = folly::dynamic::object();

packages/react-native/ReactCommon/react/renderer/components/text/RawTextProps.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ class RawTextProps : public Props {
3737
SharedDebugStringConvertibleList getDebugProps() const override;
3838
#endif
3939

40-
#ifdef ANDROID
41-
40+
#ifdef RN_SERIALIZABLE_STATE
4241
folly::dynamic getDiffProps(const Props* prevProps) const override;
43-
4442
#endif
4543
};
4644

0 commit comments

Comments
 (0)