mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Removing checks for oldProps object in [ComponentView updateProps:oldProps:]
Summary: It's a antient left over which was copy pasted a dozen of times. All `RCTViewComponentView` subclasses have own copy of the old props `_props`, so it's useless to check for `oldProps`. Reviewed By: mdvacca Differential Revision: D15770067 fbshipit-source-id: 39f4d71ccdcf0c9a5b911b17a3b922dbe6dd9a8e
This commit is contained in:
committed by
Facebook Github Bot
parent
dbbdf72248
commit
b8bc40e2f0
+1
-1
@@ -60,7 +60,7 @@ static UIActivityIndicatorViewStyle convertActivityIndicatorViewStyle(const Acti
|
||||
|
||||
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
||||
{
|
||||
const auto &oldViewProps = *std::static_pointer_cast<const ActivityIndicatorViewProps>(oldProps ?: _props);
|
||||
const auto &oldViewProps = *std::static_pointer_cast<const ActivityIndicatorViewProps>(_props);
|
||||
const auto &newViewProps = *std::static_pointer_cast<const ActivityIndicatorViewProps>(props);
|
||||
|
||||
[super updateProps:props oldProps:oldProps];
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
||||
{
|
||||
const auto &oldImageProps = *std::static_pointer_cast<const ImageProps>(oldProps ?: _props);
|
||||
const auto &oldImageProps = *std::static_pointer_cast<const ImageProps>(_props);
|
||||
const auto &newImageProps = *std::static_pointer_cast<const ImageProps>(props);
|
||||
|
||||
[super updateProps:props oldProps:oldProps];
|
||||
|
||||
@@ -71,7 +71,7 @@ using namespace facebook::react;
|
||||
|
||||
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
||||
{
|
||||
const auto &oldScrollViewProps = *std::static_pointer_cast<const ScrollViewProps>(oldProps ?: _props);
|
||||
const auto &oldScrollViewProps = *std::static_pointer_cast<const ScrollViewProps>(_props);
|
||||
const auto &newScrollViewProps = *std::static_pointer_cast<const ScrollViewProps>(props);
|
||||
|
||||
[super updateProps:props oldProps:oldProps];
|
||||
|
||||
@@ -50,7 +50,7 @@ using namespace facebook::react;
|
||||
|
||||
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
||||
{
|
||||
auto const &oldConcreteProps = *std::static_pointer_cast<PullToRefreshViewProps const>(oldProps ?: _props);
|
||||
auto const &oldConcreteProps = *std::static_pointer_cast<PullToRefreshViewProps const>(_props);
|
||||
auto const &newConcreteProps = *std::static_pointer_cast<PullToRefreshViewProps const>(props);
|
||||
|
||||
[super updateProps:props oldProps:oldProps];
|
||||
|
||||
@@ -109,7 +109,7 @@ using namespace facebook::react;
|
||||
|
||||
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
||||
{
|
||||
const auto &oldSliderProps = *std::static_pointer_cast<const SliderProps>(oldProps ?: _props);
|
||||
const auto &oldSliderProps = *std::static_pointer_cast<const SliderProps>(_props);
|
||||
const auto &newSliderProps = *std::static_pointer_cast<const SliderProps>(props);
|
||||
|
||||
[super updateProps:props oldProps:oldProps];
|
||||
|
||||
@@ -45,7 +45,7 @@ using namespace facebook::react;
|
||||
|
||||
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
||||
{
|
||||
const auto &oldSwitchProps = *std::static_pointer_cast<const SwitchProps>(oldProps ?: _props);
|
||||
const auto &oldSwitchProps = *std::static_pointer_cast<const SwitchProps>(_props);
|
||||
const auto &newSwitchProps = *std::static_pointer_cast<const SwitchProps>(props);
|
||||
|
||||
[super updateProps:props oldProps:oldProps];
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ using namespace facebook::react;
|
||||
|
||||
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
||||
{
|
||||
const auto &oldViewProps = *std::static_pointer_cast<const UnimplementedNativeViewProps>(oldProps ?: _props);
|
||||
const auto &oldViewProps = *std::static_pointer_cast<const UnimplementedNativeViewProps>(_props);
|
||||
const auto &newViewProps = *std::static_pointer_cast<const UnimplementedNativeViewProps>(props);
|
||||
|
||||
[super updateProps:props oldProps:oldProps];
|
||||
|
||||
@@ -107,7 +107,7 @@ using namespace facebook::react;
|
||||
NSStringFromClass([self class]));
|
||||
#endif
|
||||
|
||||
auto const &oldViewProps = *std::static_pointer_cast<ViewProps const>(oldProps ?: _props);
|
||||
auto const &oldViewProps = *std::static_pointer_cast<ViewProps const>(_props);
|
||||
auto const &newViewProps = *std::static_pointer_cast<ViewProps const>(props);
|
||||
|
||||
_props = std::static_pointer_cast<ViewProps const>(props);
|
||||
|
||||
Reference in New Issue
Block a user