Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,25 @@ SharedDebugStringConvertibleList HostPlatformViewProps::getDebugProps() const {
}
#endif

#ifdef ANDROID

folly::dynamic HostPlatformViewProps::getDiffProps(
const Props* prevProps) const {
folly::dynamic result = folly::dynamic::object();

static const auto defaultProps = HostPlatformViewProps();

const HostPlatformViewProps* oldProps = prevProps == nullptr
? &defaultProps
: static_cast<const HostPlatformViewProps*>(prevProps);

if (focusable != oldProps->focusable) {
result["focusable"] = focusable;
}

return result;
}

#endif

} // namespace facebook::react
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ class HostPlatformViewProps : public BaseViewProps {
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList getDebugProps() const override;
#endif

#ifdef ANDROID

folly::dynamic getDiffProps(const Props* prevProps) const override;

#endif
};

} // namespace facebook::react
Loading